ES6+ Modern JavaScript

Review your knowledge of new features like arrow functions,destructuring,and modules.

1. Which keyword declares a block-scoped variable that cannot be reassigned?
2. What is the correct syntax for an arrow function that takes a parameter 'x' and returns x * 2?
3. Which of the following are features introduced in ES6 (2015)? (Select all that apply)
4. Template literals in JavaScript are enclosed in single quotes (').
5. What keyword is used to export a single default value from a module?
6. What does object destructuring allow you to do?
7. Which of the following are valid uses of the spread operator (...) in ES6+? (Select all that apply)
8. An async function always returns a Promise.
9. What does the nullish coalescing operator (??) do?
10. What constructor is used to create a new Promise object?
11. Which variable declarations are block-scoped? (Select all that apply)
12. Rest parameters (...) collect remaining function arguments into an array.
13. Which keyword is used to inherit from a parent class in ES6 classes?
14. What is the output of: `console.log(${2 + 3})`?
15. What is the primary purpose of the optional chaining operator (?.)?
16. Which are valid ES6 module import statements? (Select all that apply)
17. Variables declared with 'let' are hoisted but cannot be accessed before declaration (temporal dead zone).
18. Which feature do template literals provide that regular strings do not?
19. What term describes function parameters that have predefined values if no argument is provided?
20. Which ES6+ features simplify asynchronous code handling? (Select all that apply)
Answered 0 of 0 — 0 correct