Dup Goto 📝

JavascriptLoops

PT2/aw/lang/js 07-31 13:46:40
To Pop
8 lines, 56 words, 243 chars Monday 2023-07-31 13:46:40
for( let i=0; i<10; i++ ) { console.log(i) } // C-style
a = ["a","b","c"]
for( let i in a ) { console.log(i) } // 0 1 2
for( let x of a ) { console.log(x) } // a b c
a.forEach(x => console.log(x) } // a b c
b = a.map(x => `hello ${x}`)