You are calling the Array constructor with an argument that is not a whole number (whole numbers consist of zero plus the set of positive integers).
To correct this error
Use positive integers only when creating a new
Arrayobject. If you want to create an array with a single element that is not an integer, do it in a two-step process. First create an array with one element, then place the value in the first element (array). The following is an example that generates this error.
var piArray = new Array(3.14159);
The following example demonstrates the correct way to specify an array with a single numeric element.
var piArray = new Array(1); piArray  = 3.14159;
There is no upper limit for the size of an array, other than the maximum integer value (approximately 4 billion).