JavaScript Quiz

1 / 25

What is the output of console.log(5 === '5');?

2 / 25

What defines a higher-order function?

3 / 25

What is a closure in JavaScript?

4 / 25

Which statement is used to execute a block of code repeatedly?

5 / 25

What will be the output of const arr = []; arr[2] = 10; console.log(arr);?

6 / 25

What does console.log(new Array() instanceof Object); evaluate to?

7 / 25

What is the primary mechanism that allows objects in JavaScript to inherit properties from other objects?

8 / 25

What is a "Temporal Dead Zone" in JavaScript?

9 / 25

What is the output of the following code? let x = 0; let output = (function(x) { delete x; return x; })(0); console.log(output);

10 / 25

Which of the following is not a reserved word in JavaScript?

11 / 25

In a switch statement, what keyword terminates a case?

12 / 25

What is the output of console.log(myVar); var myVar = 5;?

13 / 25

What is the correct syntax for an arrow function that returns the sum of a and b?

14 / 25

hat is the output of console.log(false?? 'default');?

15 / 25

What is the output of console.log(5 == '5');?

16 / 25

What is the correct syntax to display "Hello World" in an alert box?

17 / 25

What will console.log(this); log when executed in the global context of a browser?

18 / 25

What will console.log(typeof null); return?

19 / 25

What is the output of console.log(3 + 2 + '7');?

20 / 25

What will console.log(NaN === NaN); evaluate to?

21 / 25

Which keyword is used for a variable that can be reassigned?

22 / 25

Which data type in JavaScript is used to represent logical values?

23 / 25

Which method is used to add a new item to the end of an array?

24 / 25

What is the output of console.log(10 - '5');?

25 / 25

What is the primary purpose of Promise.all()?

Your score is



Overview:

Think you know JavaScript? Take our JavaScript Quiz and put your coding knowledge to the test! From basics like variables and loops to advanced concepts, this quiz is perfect for learners and developers who want to level up their JS skills.