Last active
January 3, 2017 18:20
-
-
Save pavel-lens/499c2a1f2f56c8dcb564f19491ca3e2f to your computer and use it in GitHub Desktop.
Imperative-style programming in Javascript
This file contains 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
const array = [1, 2, 3, 4, 5]; | |
for (let i=0; i < array.length; i++) { | |
array[i] = array[i] * 2; | |
} | |
console.log(array); // [ 2, 4, 6, 8, 10 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment