Вычисленные названия свойств

//Use [] , that will be computed and used as the property name.

const key1 = "name";
const key2 = "age";
const student = {
    [key1]:"john Doe",
    [key2]:26
}
console.log(student)
//{ name:"john Doe", age:26 }
</ProgAli>