Spread operator doubles runtime

August 30, 2017

the following two expressions do the same job, but the later one doubles the runtime.

const arr = new Array(100)
arr[0] = 1
const arr = [1, ...new Array(99)]

Tagged withjavascript

Questions, Comments, Suggestions? Open an Issue