Skip to content
Retr0 Academy
Advanced JavaScript

Advanced JavaScript · 8 questions

Advanced JavaScript quiz

Answer every question, then score the quiz. The result is saved in this browser.

1. fetch('/api') returns HTTP 500. What happens to the promise returned by fetch?
2. Which combinator waits for every promise and never rejects?
3. What does this log? console.log('A'); setTimeout(() => console.log('B')); Promise.resolve().then(() => console.log('C')); console.log('D');
4. for (var i = 0; i < 3; i++) setTimeout(() => console.log(i)); prints?
5. Module counter.js has export let count = 0; export function inc() { count++ }. main.js imports both, calls inc(), then logs count. Output?
6. Why use one listener on a <ul> with event.target.closest('li') instead of a listener per <li>?
7. Which is safe for rendering a user-supplied string into the page?
8. Why does yoctoToNear use BigInt?