Javascript Question and answers Learn Simpli September 6, 2019 no Comments 1. What will the following statement return 1 == "1" ? True False 1 0 None 2. What will be the output of the below code? test1@test.com, test2@test.com 0, 1, email, email None 3. Can a function can be assigned to a variable in JavaScript? True False Some time None of the above None 4. Which is NOT a JavaScript object in the following? var obj = {}; var obj = { name: "Steve"}; var obj = { name = "Steve"}; var obj = new Object(); None 5. Find the output of the following JavaScript code?for(var x = 1; x < 5; x++)console.log(x); 5555 1234 12345 11111 None 6. 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 7. How is strict mode in used to apply in JavaScript? "apply strict" "use strict" "strict" "strict mode" None 8. Which is an example of anonymous function in JavaScript in the following answers? var myFunc = function(){ }; function(){ }; var myFunc = (){ }; All of the above. None 9. 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 10. Which object represent parameters of current function inside any function in the following? Global arguments this Object None 11. 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 12. Which is a valid JavaScript function in following answers? var myFunc = function myFunc{ }; function myFunc(){ }; myFunc function(){ }; function myFunc = { }; None 13. 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 14. What will be the function? if a variable declared without var keyword inside function. local block global undefined None 15. 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 Time's up