What does this log?
console.log("5" + 3, "5" - 3);What this JavaScript test measures, in short
This test checks whether you can predict what real JavaScript does: how values convert, how equality works, where variables live, and in what order asynchronous code runs. It rewards knowing the language's rules over knowing a framework.
Every snippet behaves the same in any modern browser or in Node.js. The questions are our own and are not standardised against a population, so treat the result as a check on your knowledge, not a certification.
By What's Your IQ · Reviewed 4 Oct 2026- Format
- 15 predict-the-output questions, 4 options each
- Topics
- Types and coercion, objects and arrays, scope and hoisting, async and the event loop
- Standard
- ECMAScript (ECMA-262), with a new edition every June since 2015
- Language
- Created by Brendan Eich at Netscape in 1995
Why a promise beats a zero-second timer
JavaScript runs one thing at a time. Callbacks wait in two queues, and the promise queue (microtasks) is always emptied before the next timer (task) gets a turn. Step through it.
Most gotchas have a modern way out
var total = 0;for (var i = 0; i < 3; i++) { total += i;}// i is still 3 out herelet total = 0;for (let i = 0; i < 3; i++) { total += i;}// i doesn't exist out herelet and const are scoped to their block, can't be used before their line and, with const, can't be reassigned. That removes the traps in questions 10 to 13.
- W3Techs. Usage statistics of JavaScript as client-side programming language on websites.
- Wirfs-Brock, A., & Eich, B. (2020). JavaScript: The first 20 years. Proceedings of the ACM on Programming Languages, 4(HOPL), 1–189.
- Ecma International. ECMA-262: ECMAScript Language Specification.
- Stack Overflow. (2024). 2024 Developer Survey: Technology.