T TestsWorld

Free practice test · Developer Skills

JavaScript Test (ES6+)

200 questions with a timer and instant results. Practise in short drills or take the full test, then see exactly which topics need work.

📝 200 questions ⏱ 150 min for all 🎯 Pass mark 60% 💸 Free, unlimited attempts
⚡
Short drills

Pick 10, 25 or 50 questions for a quick round, or take all of them.

💡
Learn as you go

Practice mode shows the right answer and an explanation for every question.

📊
See your weak spots

Your result shows strong and weak topics and what to read next.

What's in the test

Easy 36% Medium 47% Hard 18%
Typeof Operator 6Type Coercion 6Equality Operators 3NaN Behavior 1Floating Point 1Truthy And Falsy 2Hoisting 4Temporal Dead Zone 2Closures In Loops 5Const Declarations 2Function Hoisting 2Block Scope 2

Sample questions with answers

6 of the 200 questions in JavaScript Test (ES6+). Try each one, then open the answer.

  1. Question 1

    What is logged to the console?

    console.log(typeof null);
    • A. object
    • B. null
    • C. number
    • D. undefined
    Show answer
    Answer: A. object
    typeof null returns 'object' because of a historic bug in the first JavaScript engine that was kept for compatibility. Use value === null to test for null.
  2. Question 2

    What is logged to the console?

    console.log(typeof []);
    • A. object
    • B. list
    • C. undefined
    • D. array
    Show answer
    Answer: A. object
    Arrays are objects, so typeof reports 'object'. Use Array.isArray() to check for an array.
  3. Question 3

    What is logged to the console?

    console.log(typeof function () {});
    • A. undefined
    • B. method
    • C. function
    • D. object
    Show answer
    Answer: C. function
    Functions are objects, but typeof has a special case and returns 'function' for anything callable.
  4. Question 4

    What is logged to the console?

    console.log(1 + '2');
    • A. 12
    • B. 1 2
    • C. 3
    • D. NaN
    Show answer
    Answer: A. 12
    When either operand of + is a string, the other is converted to a string and concatenated. So 1 + '2' gives the string '12'.
  5. Question 5

    What is logged to the console?

    console.log('5' - 2);
    • A. NaN
    • B. 3
    • C. 52
    • D. -3
    Show answer
    Answer: B. 3
    The - operator only works on numbers, so '5' is converted to 5. Only + has the string-concatenation behaviour.
  6. Question 6

    What is logged to the console?

    console.log(null == undefined, null === undefined);
    • A. true true
    • B. true false
    • C. false false
    • D. false true
    Show answer
    Answer: B. true false
    Loose equality treats null and undefined as equal to each other (and nothing else). Strict equality also compares types, and their types differ.

Want all 200 with a timer and a topic-wise result? Start the free test at the top of this page.

About this practice test

This practice test checks your working knowledge of modern JavaScript (ES6+), covering both the language itself and the browser and Node.js basics that come up in hiring tests and technical interviews.

What it covers

  • Types, coercion, == vs ===, typeof, and truthy/falsy values
  • var, let and const, hoisting, the temporal dead zone, scope and closures
  • Functions, arrow functions, default and rest parameters, and this with call, apply and bind
  • Objects, destructuring, spread, optional chaining, nullish coalescing, arrays and array-method pitfalls
  • Prototypes, classes and inheritance
  • Promises, async/await, error handling, and the event loop (microtasks vs macrotasks)
  • ES modules vs CommonJS, DOM events (bubbling, delegation, preventDefault), browser storage, fetch, JSON and CORS basics
  • Map, Set, Symbol, generators, debouncing and throttling

Who it is for

Freshers and early-career frontend and full-stack developers preparing for JavaScript rounds, online coding assessments and interviews.

Format

200 multiple-choice questions mixing output-prediction snippets ("what is logged?") with concept questions, at easy, medium and hard levels. Every question has a short explanation shown after you answer, including the common trap where there is one.

Free to attempt with a TestsWorld account. No card required.

Before you start: device, fullscreen and proctoring