多次元配列で該当要素参照
let userData = [
['a', 2, 'Tokyo'],
['b', 3, 'Fukuoka'],
['c', 4, 'Sendai']
];
let user1 = userData[0];
console.log(user1[0]);
console.log(user1[1]);
console.log(user1[2]);
結果
a
2
Tokyo
kinkun's blog
多次元配列で該当要素参照
let userData = [
['a', 2, 'Tokyo'],
['b', 3, 'Fukuoka'],
['c', 4, 'Sendai']
];
let user1 = userData[0];
console.log(user1[0]);
console.log(user1[1]);
console.log(user1[2]);
結果
a
2
Tokyo