Chapter quiz · Data & Types

Test what you learned.

8 questions on Data & Types. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Data & Types — Chapter Quiz

Eight questions covering strings, numbers, booleans, and arrays.

0/ 9
  1. Question 1
    1

    What does typeof null return?

  2. Question 2
    2

    What does this code log?

    console.log("5" + 3);
    
  3. Question 3
    3

    What does this code log?

    console.log(0.1 + 0.2 === 0.3);
    
  4. Question 4
    4

    Which of these values are **falsy**?

    Select all that apply.

  5. Question 5
    5

    To get the **last** element of an array arr cleanly in modern JS, you call arr._____. (Fill in the method call.)

  6. Question 6
    6

    What does this code log?

    const nums = [10, 1, 2];
    nums.sort();
    console.log(nums[0]);
    
  7. Question 7
    7

    Which array method returns a **new** array of items that pass a predicate?

  8. Question 8
    8

    After const [a, ...rest] = [1, 2, 3, 4];, what is rest?

Pick an answer — instant feedback as you go.