[javascript] How to create an array containing 1...N