Last active
September 19, 2018 20:04
-
-
Save charlesdarkwind/eba520752d69289294c84ca23e274ae9 to your computer and use it in GitHub Desktop.
array formatter: log array with 10 elements per line
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
for (let i = 0; i < arr.length; i+=10) { | |
let str = ''; | |
for (let j = i; j < i + 10; j++) if (arr[j]) str += "'"+arr[j]+"', " | |
console.log(str); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment