Skip to content

Instantly share code, notes, and snippets.

@darksh3ll
Last active June 15, 2018 06:15
Show Gist options
  • Select an option

  • Save darksh3ll/747046bdc1438cde340f4f6b4b5e0c46 to your computer and use it in GitHub Desktop.

Select an option

Save darksh3ll/747046bdc1438cde340f4f6b4b5e0c46 to your computer and use it in GitHub Desktop.
parcourir un tableau avec la forof
console.log("ES5");
//ES5
const arr = [12,23,54,65];
for ( let i = 0; i < arr.length; i++ ) {
console.log(arr[i]);
}
console.log("ES6");
//ES6
const arr1 = [12,23,54,65,100];
for (let nombres of arr1 ) {
console.log(nombres);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment