Javascript Question and answers Learn Simpli September 6, 2019 no Comments 1. How is strict mode in used to apply in JavaScript? "apply strict" "use strict" "strict" "strict mode" None 2. What will be the output of the below code? 0, 1, 2, 10 1, 2, 10 0, 1, 2, 2 1, 2, 3, 10 None Hint 3. Which is a valid JavaScript function in following answers? var myFunc = function myFunc{ }; function myFunc(){ }; myFunc function(){ }; function myFunc = { }; None 4. What will be the output of the below code? test1@test.com, test2@test.com 0, 1, email, email None 5. Which is NOT a correct way of declaring an array in JavaScript in following answers? ar arr = [1, "two", 3 , 4 ]; var arr = new Array(); var[] arr = new Number()[5]; None of the above None 6. Which object represent parameters of current function inside any function in the following? Global arguments this Object None 7. Find the output of the following JavaScript code?for(var x = 1; x < 5; x++)console.log(x); 5555 1234 12345 11111 None 8. What will be the function? if a variable declared without var keyword inside function. local block global undefined None 9. Can a function can be assigned to a variable in JavaScript? True False Some time None of the above None 10. What will be the output of the below code? Init developer constructor Init developer constructor, Init employee constructor Init employee constructor Init employee constructor, Init developer constructor None 11. What is the correct output of the following JavaScript code?var x = 0do{ console.log(x) }while(x > 0) 0 null 1 No output None 12. What does null means in JavaScript? Null means empty string value. Null means absence of a value. Null means unknown value. Null means zero value. None 13. How a error can be handled in JavaScript? By using try, catch & finally block. By using if-else block By using eval(). By writing error proof code. None 14. Is JavaScript a ECMAScript? True false both none None 15. Which is NOT a JavaScript object in the following? var obj = {}; var obj = { name: "Steve"}; var obj = { name = "Steve"}; var obj = new Object(); None Time's up