+ 1
What is the syntax of Array containing 1 integer???
var name=new Array(3); The above statement creates empty array with length of 3 elements. What is the syntax of Array containing 1 integer???
3 Respuestas
+ 6
var myArr = [42];
this is an array with one element, the number 42
just another valid way to go
+ 1
if you do
var arr=new Array()
arr(0)=1
you have an array with one integer