Created
February 7, 2019 08:59
-
-
Save didacus/a92a6fd973e998ca9a790a615b125d3d to your computer and use it in GitHub Desktop.
ES2015 Spread operator — Do it 'x' times
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dotIt = number => { | |
const res = [ ...Array(number) ].map((_, i) => { | |
return i * number | |
}) | |
return res | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment