Week 4
Quiz 9d

Assignment: map

Provide a function (or lambda expression) named 'twice' such that

[1,2,3].map(twice) equals [2,4,6]
Solution
const twice = x => x * 2;

Your solution will be tested against:

[1,2,3].map(twice).toString() === "2,4,6"