Евгений
Мыслитель
(5952)
9 месяцев назад
<script>
const person = {
name: 'Vladlen',
age: 26,
isprogrammer: true,
language: ['ru', 'en', 'de'],
'complex key': 'complex value',
['key_' + (1+3)]: 'compiled key',
greet: function() {
console.log('greet from person');
}
};
console.log(person.name);
const agekey = 'age';
console.log(person[agekey]);
console.log(person['complex key']);
</script>
const person = {
name: 'Vladlen',
age: 26,
isprogrammer: true,
language: ['ru', 'en', 'de'],
'complex key ':' complex value',
['key_' + (1+3)] : 'compiled key'
greet() {
console.log('greet from person')
}
}
console.log( person.name )
const agekey = 'age'
console.log (person [age key] )
console.log (person ['complex key'])
</script>