Created
January 26, 2019 16:48
-
-
Save flexaddicted/a4819c10d7b977a99bec5e56e9ae5880 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myMap2(numbers) { | |
const elements = []; | |
for(let i = 0; i < numbers.length; i++) { | |
elements.push(numbers[i] * 2); | |
} | |
return elements; | |
} | |
const doubles = myMap2([1, 2, 3, 4]); | |
console.log(doubles); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment