DEV Community

Discussion on: JavaScript/Typescript Tips compilation 2021🚀

Collapse
sesay profile image
sesay

not sure, why i would do this

```const moods = ['good', 'better', 'best']

for ([idx, mood] of moods.entries()) {
console.log(${index}. ${mood})
}```

In my opinion looks a little bit more complicated