JavaScript Cheat Sheet 2026

The 30 highest-yield JavaScript facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

30 questions
45 min time limit
70.00% to pass
  1. What does `Object.defineProperty()` allow you to do? Define or modify a property with precise control over its descriptor attributes
  2. What is the value of continuing education in closures and scope for JavaScript professionals? It keeps professionals current with evolving standards and practices
  3. What is the value of continuing education in es6+ features for JavaScript professionals? It keeps professionals current with evolving standards and practices
  4. What types of errors can be thrown in JavaScript? Any value including strings, numbers, and objects
  5. What happens when you use the spread operator `...` to copy an object? A new object is created with a shallow copy of the original's own enumerable properties
  6. What does `String.prototype.slice()` do with negative arguments? Negative values count from the end of the string
  7. What role does collaboration play in dom manipulation for JavaScript professionals? It enhances outcomes through diverse perspectives and shared expertise
  8. Which of the following objects has the URL property? Document
  9. When `String.prototype.match()` is called with a regex that has the `g` flag, what does it return? An array containing all matched substrings
  10. What is the value of continuing education in modules for JavaScript professionals? It keeps professionals current with evolving standards and practices
  11. What is 'lexical scope' in JavaScript? Scope determined at author time based on where functions are written in the code
  12. What does `Array.prototype.copyWithin()` do? Copies a part of the array to another location within the same array
  13. What is the value of continuing education in dom manipulation for JavaScript professionals? It keeps professionals current with evolving standards and practices
  14. What is the purpose of `Object.getPrototypeOf()`? Returns the prototype (internal `[[Prototype]]`) of the specified object
  15. What does the WebSocket attribute Socket.readyState with a value of 2 mean? Handshake connection
  16. What does `str.split(/,\s*/)` do? Splits the string on each comma, discarding any spaces that immediately follow it
  17. What is the primary benefit of version control in async programming for JavaScript? It tracks changes and enables collaboration
  18. What function was used to remove all name event handlers? removeAllListeners(name)
  19. An event emitter is which of the following? process
  20. What does `^` mean when placed at the very start of a regex pattern (outside a character class)? Asserts the match must start at the beginning of the string
  21. What is a positive lookahead assertion in a regular expression? A zero-width assertion that matches a position only if a specified pattern follows it
  22. What does the character class `[^abc]` match? Any single character that is NOT a, b, or c
  23. Which standard construct for data validation is available in the development environment? All of the above
  24. What does `String.prototype.includes()` do? Returns true if the string contains the given substring, otherwise false
  25. Which professional attribute is most valued in modules within the JavaScript field? Accountability and commitment to standards
  26. What does the quantifier `{2,5}` mean in a regular expression? Matches between 2 and 5 occurrences of the preceding token
  27. What is the value of continuing education in node.js basics for JavaScript professionals? It keeps professionals current with evolving standards and practices
  28. What does `Object.keys()` return? An array of an object's own enumerable property names
  29. What does `Promise.race()` return? A promise that resolves or rejects with the value of the first settled promise
  30. What does the `y` (sticky) flag do in a JavaScript regular expression? Forces the match to start exactly at the regex's lastIndex position