Interview Hack
Home
About
Games
Levels
JavaScript Quiz - Level 5
1. What is WeakMap for?
Object keys, GC-safe
Only string keys
Faster iteration
Persist in localStorage
2. What’s true about WeakSet?
Any value
Only objects, GC-safe
Iterable with for...of
Has size property
3. console.log(null ?? "default") → ?
"default"
null
undefined
Error
4. What does ?. do?
Assigns default
Stops if null/undefined
Throws error
Works on any type
5. Proxy trap get() does what?
Intercepts access
Intercepts assignment
Intercepts deletion
Intercepts new
6. Reflect.set() returns?
Boolean success
Assigned value
Updated object
Always undefined
7. Dynamic import() returns...
Promise with module
Blocks execution
Loads sync
Makes module global
8. Top-level await allows?
Only inside async
Anywhere in script
Outside async in ES modules
In callbacks w/o async
9. What hurts performance?
Closures in loop
Using const
Default params
Template literals
SUBMIT EXAM