+ 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

12th May 2019, 11:23 PM
Vladyslav Semeniuk 🐸
Vladyslav Semeniuk 🐸 - avatar
5 ответов
12th May 2019, 11:47 PM
Solo
Solo - avatar
+ 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"
12th May 2019, 11:51 PM
Jônatas Araripe
Jônatas Araripe - avatar
+ 2
Vladislav Semeniuk Нет, это не двумерный массив. Определить индекс массива Вы можете как угодно: "с[с[с[0]]] == 5".
13th May 2019, 12:06 AM
Solo
Solo - avatar
+ 1
Vasiliy вон оно как, спасибо.
12th May 2019, 11:49 PM
Vladyslav Semeniuk 🐸
Vladyslav Semeniuk 🐸 - avatar
0
Vasiliy я шарю, что такое конкатенация. Не знал, как двойной аррай работает. Уже понял, спасибо.
12th May 2019, 11:57 PM
Vladyslav Semeniuk 🐸
Vladyslav Semeniuk 🐸 - avatar