Javascript Question and answers Learn Simpli September 6, 2019 no Comments 1. What will be the output of the below code? test1@test.com, test2@test.com 0, 1, email, email None 2. Is JavaScript a ECMAScript? True false both none None 3. What will the following statement return 1 == "1" ? True False 1 0 None 4. 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 5. 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 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. Which is NOT a JavaScript object in the following? var obj = {}; var obj = { name: "Steve"}; var obj = { name = "Steve"}; var obj = new Object(); None 9. 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 10. 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 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 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 13. Can a function can be assigned to a variable in JavaScript? True False Some time None of the above None 14. How is strict mode in used to apply in JavaScript? "apply strict" "use strict" "strict" "strict mode" None 15. Find the output of the following JavaScript code?for(var x = 1; x < 5; x++)console.log(x); 5555 1234 12345 11111 None Time's up