Created
December 30, 2015 13:08
-
-
Save qetr1ck-op/bf8b0d0ffe7afcf1988a 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
const incrementCounter = (list, i) => { | |
/*return list.slice(0, i) | |
.concat(list[i] + 1) | |
.concat(list.slice(i + 1));*/ | |
return [ | |
...list.slice(0, i), | |
list[i] + 1, | |
...list.slice(i + 1) | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment