Skills101
← All practice quizzes

Quiz: Functions, Arrays and Objects

5 questionsNo time limitPass: 60%+10 XP on first pass

Write functions and arrow functions, use the array methods every developer uses (map, filter, reduce, find, sort), work with objects, destructuring, spread and JSON.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What does this print?

    console.log([1, 2, 3, 4].filter((n) => n % 2 === 0).map((n) => n * 10));
    
  2. Question 2

    What does this print?

    console.log([5, 1, 10].sort());
    
  3. Question 3

    What does this print?

    console.log([3, 4, 5].reduce((acc, n) => acc + n, 10));
    
  4. Question 4

    What does const { a, ...others } = { a: 1, b: 2, c: 3 } put in others?

  5. Question 5

    Which method returns the FIRST matching element (or undefined)?