Skip to content

Instantly share code, notes, and snippets.

@flexaddicted
Last active January 26, 2019 16:42
Show Gist options
  • Save flexaddicted/89ccf1c5c5b50b3c6147b92fb166121b to your computer and use it in GitHub Desktop.
Save flexaddicted/89ccf1c5c5b50b3c6147b92fb166121b to your computer and use it in GitHub Desktop.
function myMap(numbers) {
const elements = [];
for(let i = 0; i < numbers.length; i++) {
elements.push(numbers[i].toString(10));
}
return elements;
}
const strings = myMap([1, 2, 3, 4]);
console.log(strings);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment