JavaScript Fundamentals

Test your grasp of variables,data types,and basic syntax in JavaScript.

1. Which keyword is block-scoped and cannot be reassigned?
2. What is the result of 3 + '3' in JavaScript?
3. Which is NOT a primitive data type in JavaScript?
4. What does typeof null return?
5. Which array method removes the last element?
6. Select all falsy values in JavaScript:
7. Which are valid loop structures in JavaScript?
8. Which are valid ways to declare a function?
9. Which operators check for equality?
10. Which are primitive data types?
11. Variables declared with 'var' are function-scoped.
12. In browsers, 'this' in a global function refers to the window object.
13. JavaScript is a statically typed language.
14. The '===' operator compares both value and type.
15. Array.prototype.map() modifies the original array.
16. What is the standard file extension for JavaScript files?
17. What method converts a JavaScript object to a JSON string?
18. What keyword declares a variable that can be reassigned but not redeclared?
19. What is the output of 'typeof 42'?
20. What abbreviation refers to the global object in Node.js?
Answered 0 of 0 — 0 correct