Skip to content

Instantly share code, notes, and snippets.

View cramhead's full-sized avatar

Marc d'Entremont cramhead

  • Squamish, BC, Canada
View GitHub Profile
@cramhead
cramhead / JavaScript
Last active July 28, 2021 21:08
JS/TS Snippets
Prints nested arrays as one string. Handy for Quokka.js
```
function printNestedArray(arr, depth = 0) {
let result = ''
const indent = ' '.repeat(depth));
if (Array.isArray(arr)) {
result = result + `\n${indent}[`
for (const item of arr) {

Keybase proof

I hereby claim:

To claim this, I am signing this object: