forin js

JavaScript
let panier = ['fraise', 'banane', 'poire'];

for (const fruit in panier) {
    console.log(panier[fruit]);
}
Source

Also in JavaScript: