Dynamic property Names in Objects

preview_player
Показать описание
const dynamic = "lastName"
let person = {
name: 'David',
[dynamic]: "asas"
}

Рекомендации по теме