Code
Use for..of
to loop through string in JavaScript.
for (const s of 'Hello World!') { console.log(s) }
Output
H
e
l
l
o
W
o
r
l
d
!
Use for..of
to loop through string in JavaScript.
for (const s of 'Hello World!') { console.log(s) }
H
e
l
l
o
W
o
r
l
d
!