+ 4
arrays
how to work with such arrays: var a= [[]]; who knows give a link to the source
9 ответов
+ 3
It is an empty nested array, what sort of "work" are you thinking about with such empty array?
+ 3
Buddy your array only has one element (index 0), which is an empty array. You can't access a[1], left alone a[1][0], there is only one element with index 0.
Can you describe your plan some more?
+ 3
Is that from SoloLearn? if so, please copy lesson link here so anyone can take a look. Otherwise share a link to the lesson ...
+ 3
Can you share a link to that code here please? I would like to study it ...
+ 2
So now the array snake is : [[x, y]]..
Better to add link..
+ 1
well, something like that
var a =[[]];
a[1][0];
+ 1
I don't even know how to say it correctly, just there is some kind of lesson or something
0
this is not sololear, when I studied someone else's code, I saw such lines of code and cannot understand how they work
0
var x;
var y;
var snake=[[]];
snake[0][0]=x;
snake[0][1]=y;