Работа с двумерным массивом
Добрый день!
var earth = [[],[]]; earth = [0].push(3); earth = [0].push(5); earth = [0].push(7); earth = [0].push(9); earth = [1].push(13); earth = [1].push(15); earth = [1].push(17); earth = [1].push(19); earth = [1].push(21); console.log(earth[0].length); console.log(earth[1].length); console.log(earth[1][0]); Что не так, не правильно объявляю? |
var earth = [[], []]; earth[0].push(3); earth[0].push(5); earth[0].push(7); earth[0].push(9); earth[1].push(13); earth[1].push(15); earth[1].push(17); earth[1].push(19); earth[1].push(21); console.log(earth[0].length); console.log(earth[1].length); console.log(earth[1][0]); |
ай, блин. Надо же такую глупость допустить. Спасибо
|
Часовой пояс GMT +3, время: 15:20. |