Skip to content

Instantly share code, notes, and snippets.

@ristaa ristaa/map.js
Created Sep 12, 2018

Embed
What would you like to do?
Usage of map Helper
let arr = [1, 2, 3, 4, 5];
let doubled = arr.map(num => {
return num * 2;
});
console.log(doubled); // [2, 4, 6, 8, 10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.