Last active
July 29, 2016 21:57
-
-
Save alexeygolev/5e710dfb43505ae1614d8114a9b0b997 to your computer and use it in GitHub Desktop.
simple add
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
function add1(xs) { | |
let idx = 0 | |
let result = [] | |
while (idx < xs.length) { | |
result[idx] = xs[idx] + 1 | |
idx = idx + 1 | |
} | |
return result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment