DEV Community

loading...

Discussion on: What The For Loop?

Collapse
oskarlarsson profile image
Oskar Larsson

You can also do

console.log( [...Array(20).keys()].filter(n => {return n%2}).join(', ') )

Probably slower tho.