for with array javascript code example
Example 1: for array javascript
let iterable = [10, 20, 30];
for (let value of iterable) {
value += 1;
console.log(value);
}
// 11
// 21
// 31
Example 2: javascript loop and array
var array = ["hello","world"];
array.forEach(item=>{
console.log(item);
});