Question 1: String to Number Conversion
What will be the result of "5" - 2 in JavaScript?
Question 2: Ternary Operator
What is the result of let x = 10; let result = (x > 5) ? "Big" : "Small";?
Question 3: for...in Loop
Which loop is used to iterate over object properties?
Question 4: Array Includes Check
What will be the result of:
Question 5: Arrow Function this Behavior
What is special about this in arrow functions?
Question 6: Object.freeze()
What does Object.freeze(obj) do?
Question 7: this in setTimeout
What does the following code output in a browser?
Question 8: Removing Elements
Which method removes a child node from the DOM?
Question 9: Spread Operator
What does the following produce?
Question 10: Handling Errors with Async/Await
How do you properly catch errors in async/await?
Question 11: Implicit Conversion with + Operator
What is the result of "5" + 2 in JavaScript?
Question 12: JS Modulus Operator
What is the result of 17 % 5 in JavaScript?
Question 13: Break Statement
What does the break statement do inside a loop?
Question 14: IndexOf Method
What will be the result of:
Question 15: IIFE (Immediately Invoked Function Expression)
Which syntax correctly represents an IIFE?
Question 16: Object Destructuring
What will this code output?
Question 17: Execution Context
How many phases does the JavaScript execution context have?
Question 18: Event Listener
How do you add a click event listener to a button with ID btn?
Question 19: Object Property Shorthand
What is the shorthand syntax for { name: name, age: age }?
Question 20: Promise.all()
What does Promise.all([p1, p2, p3]) do?