js for each x of y code example
Example 1: for in and for of in js
const iterable = [10, 20, 30];
for (const value of iterable) {
console.log("fef"+value);
}
// 10
// 20
// 30
Example 2: es6 for-of loop
for (let itme of list) {
...
}
const iterable = [10, 20, 30];
for (const value of iterable) {
console.log("fef"+value);
}
// 10
// 20
// 30
for (let itme of list) {
...
}