DEV Community

Discussion on: Daily Challenge #194 - Spread Number

Collapse
 
mellen profile image
Matt Ellen

Another way:

const spreadNumber = n => Array.from({length:n}).map((_, i) => i+1);