JavaScript Quiz: 12 Core Questions
This free JavaScript quiz covers the fundamentals that interviewers ask about most: var, let and const scope, == versus ===, truthy and falsy values, array methods, closures, promises and async/await, the event loop, event delegation, this in arrow functions, typeof null and JSON. It suits beginners who have finished an introductory course. Answer all 12 questions, check your score, then read each explanation and revisit the JavaScript guide for weak areas.
Frequently asked questions
Which version of JavaScript does this quiz use?
Modern JavaScript (ES2015 and later) as supported by current browsers, including let, const, arrow functions, promises and async/await.
How can I check the answers myself?
Open your browser's developer tools, go to the Console tab and paste in the code from a question to see the result.
What should I learn after these basics?
Practise DOM manipulation and fetching data from APIs, then learn a back-end language such as PHP to build complete web applications.