Skip to content

Instantly share code, notes, and snippets.

@krazov
Last active March 4, 2017 20:27
Show Gist options
  • Save krazov/bd4dee2c658cd671c6742ad08b6bdf87 to your computer and use it in GitHub Desktop.
Save krazov/bd4dee2c658cd671c6742ad08b6bdf87 to your computer and use it in GitHub Desktop.
Old school mapping
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var newArray = [];
for (var i = 0; i < array.length; i++) {
newArray.push(array[i] * 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment