JavaScript Study Guide 2026
Everything you need to pass the JavaScript exam in one place: the exam format, every topic to study, real practice questions with explanations, flashcards, and full-length practice tests. Free, no sign-up needed.
📋 JavaScript Exam Format at a Glance
📚 JavaScript Topics to Study (61)
✍️ Sample JavaScript Questions & Answers
1. Which HTTP method does `req.method` return for a browser form submission using the default form method?
HTML forms default to `method="get"`, so `req.method` is `'GET'` unless the form explicitly specifies `method="post"`.
2. Which ES6 feature allows a function to pause execution and resume later?
Generator functions, declared with `function*`, use the `yield` keyword to pause execution and resume on the next `.next()` call.
3. What does `Array.prototype.reduce()` do?
`reduce()` executes a reducer function on each element of the array, accumulating the result into a single output value. It takes a callback and an optional initial value.
4. What is the output of `console.log(typeof function(){})` in JavaScript?
`typeof` returns `'function'` for function objects, making them distinguishable from plain objects.
5. What does the `as` keyword do in `export { foo as bar }`?
The `as` keyword in an export renames the binding so consumers import it under the new name `bar`.
6. What is the key difference between ES6 `class` and traditional constructor functions?
Code inside a class body executes in strict mode automatically, which is not the case for regular constructor functions in non-strict scripts.