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 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 3. Which is NOT a JavaScript object in the following? var obj = {}; var obj = { name: "Steve"}; var obj = { name = "Steve"}; var obj = new Object(); None 4. 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 5. What will be the function? if a variable declared without var keyword inside function. local block global undefined None 6. Which is a valid JavaScript function in following answers? var myFunc = function myFunc{ }; function myFunc(){ }; myFunc function(){ }; function myFunc = { }; None 7. 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 8. 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 9. Find the output of the following JavaScript code?for(var x = 1; x < 5; x++)console.log(x); 5555 1234 12345 11111 None 10. What does eval() means in JavaScript? executes specified string as JavaScript code. It will return an object representing the parsed tree of the specified JavaScript code. It will execute server side code in JavaScript. It will display popup message. None 11. 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 12. Which object represent parameters of current function inside any function in the following? Global arguments this Object None 13. Is JavaScript a ECMAScript? True false both none None 14. What will the following statement return 1 == "1" ? True False 1 0 None 15. Which is an example of anonymous function in JavaScript in the following answers? var myFunc = function(){ }; function(){ }; var myFunc = (){ }; All of the above. None Time's up