javascript for element in list code example
Example 1: for elem in list javascript
var myList = ["first element", "second element", "third element"];
for (let elem in myList) {
console.log(elem);
}
Example 2: forin js
let panier = ['fraise', 'banane', 'poire'];
for (const fruit in panier) {
console.log(panier[fruit]);
}