Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed (UPI) Chapter 8: Understanding JavaScript Data Structures!

Instruction

Transforming Arrays

Sometimes you will want to apply the same operation to each item in an array, creating a new array with the changed items. You can do this using map(). Example: function double(number) { return number * 2; } const numbers = [5, 2, 7, 6]; const doubled = numbers.map(double); console.log(doubled); // [ 10, 4, 14, 12 ] Filtering Arrays Sometimes you'll want to create a new array containin...