We can also use multiword property names, but then they must be quoted:
let myVar = {
user: 'Mr.rakib hasan',
phone: 999898989,
'first name' : 'Md. Rakib ',
}
console.log(myVar['first name']) // access the multiword property in javascript
We can also use multiword property names, but then they must be quoted:
let myVar = {
user: 'Mr.rakib hasan',
phone: 999898989,
'first name' : 'Md. Rakib ',
}
console.log(myVar['first name']) // access the multiword property in javascript