Edit in JSFiddle
JavaScript 1.7
Result
let arr = [...Array(10).keys()] console.log('new array',arr);