Skip to content
KALANBLON
Show contents

Chapter 2 of 6 · 10 min

Quiz: handling data

Objects, array methods, copies and JSON: let's check that you can handle data in JavaScript. You need 70 % correct answers, and every answer is explained.

Quiz

5 questions · pass mark: 70%

  1. 1.What does doubles contain?

    One answer

    const numbers = [1, 2, 3];
    const doubles = numbers.map((n) => n * 2);
  2. 2.Which method returns the first item that meets a condition?

    One answer

  3. 3.What is displayed?

    One answer

    const a = { n: 1 };
    const b = a;
    b.n = 5;
    console.log(a.n);
  4. 4.Complete to turn an object into JSON text.

    Complete the code

    const text = JSON.__________({ city: "Accra" });
  5. 5.Which expressions equal 8? (several answers)

    Several answers possible

Your progress is saved on this device. Create a free account to keep your progress on all your devices.