This is a really stupid question, but I’m just drawing a blank here…
What type of variable declaration is this:
var s1 = [1,2,3,4]
Also, How can I construct a variable like this from multiple objects when the amount of those objects is unknown. This is what I came up with, which doesn’t work.
var s1 = [];
for(x in data[i].uh) {
s1 += data[i].uh[x];
}
is an array declaration of four integers using “Array Literal Notation”
You don’t need a loop to copy the array, simply do this:
or in your example you might want this:
Read more about copying arrays here: http://my.opera.com/GreyWyvern/blog/show.dml/1725165