JavaScript基礎-オブジェクト-
const human = {
name: ['Shiki’, 'BM’],
age: 26,
gender: 'male’,
interests: {
game: 'FPS’,
music: 'EDM’
}
};
ドット記法
human.age = 22;
ブラケット記法
human['age’] = 22;
const ageKey = 'age’;
human[ageKey] = 22;