Put in order · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects

Iteration Basics - Array Method Chaining

Arrange the elements of filtering and mapping an array:

Items to put in order

  • .filter(d => d.dangerous)
  • dinosaurs
  • .map(d => d.name)
Show the answer

Correct order:

  1. dinosaurs
  2. .filter(d => d.dangerous)
  3. .map(d => d.name)