for var in array javascript code example
Example 1: forin js
let panier = ['fraise', 'banane', 'poire'];
for (const fruit in panier) {
console.log(panier[fruit]);
}
Example 2: how to use for loops to work with array in javascript
let myArray = ["one", "two", "three", "four"];