多次元配列でサイズ取得
let userData = [
['a', 2, 'Tokyo'],
['b', 3, 'Fukuoka'],
['c', 4, 'Sendai']
];
let user1 = userData[0];
console.log(userData.length);
console.log(user1[0].length);
結果
3
3
kinkun's blog
多次元配列でサイズ取得
let userData = [
['a', 2, 'Tokyo'],
['b', 3, 'Fukuoka'],
['c', 4, 'Sendai']
];
let user1 = userData[0];
console.log(userData.length);
console.log(user1[0].length);
結果
3
3