profileRyan KesPGP keyI build stuffEmailGithubTwitterLast.fmMastodonMatrix

JavaScript For Of

Syntax

const arr = ["a", "b", "c"]
for (const elem of arr) {
  console.log(elem)
}
const arr = ["a", "b", "c"]
for (const [index, elem] of arr.entries()) {
  console.log(index + ". " + elem)
}

Related