Skip to content

Instantly share code, notes, and snippets.

@charlesdarkwind
Last active September 19, 2018 20:04
Show Gist options
  • Save charlesdarkwind/eba520752d69289294c84ca23e274ae9 to your computer and use it in GitHub Desktop.
Save charlesdarkwind/eba520752d69289294c84ca23e274ae9 to your computer and use it in GitHub Desktop.
array formatter: log array with 10 elements per line
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