JavaScript -Schleife durch String
for (var i = 0; i < str.length; i++) {
console.log(str.charAt(i));
}
TC5550
for (var i = 0; i < str.length; i++) {
console.log(str.charAt(i));
}
// for... in
for (let i in str) {
console.log(str[i]);
}
const str = "Hello Grepper!";
const chars = [...str];
chars.forEach((c, i) => console.log(c, i));