+ 1
Please, explain 4th line
Don't know, how it works(called) and where i can read about it. https://code.sololearn.com/WQxKZm5NReTK/?ref=app
5 Answers
+ 4
c[0] == 7;
c[c[0]] == c[7];
https://www.sololearn.com/learn/JavaScript/1241/
+ 2
The concat command do joined the two arrays, the first one which is B with the second which is A, in that order.
C in position Zero is value Seven.
Position seven in C is equal Four.
var a = [1,3,4,6,8];
var b = [7,3,2,9,5];
var c = b.concat(a); // c = ([7,3,2,9,5] + [1,3,4,6,8]) == [7,3,2,9,5,1,3,4,6,8]
console.log(c[c[0]]); // c[0] == First position in array equals is 7 in c is 8 position 7+1
// Logic positions
[0,1,2,3,4,5,6,7] = "Positions of c"
[7,3,2,9,5,1,3,4,6,8] = "Values of c"
+ 2
Vladislav Semeniuk
Нет, это не двумерный массив.
Определить индекс массива Вы можете как угодно:
"с[с[с[0]]] == 5".
+ 1
Vasiliy вон оно как, спасибо.
0
Vasiliy я шарю, что такое конкатенация. Не знал, как двойной аррай работает. Уже понял, спасибо.