const obj = { id: 1, name: 'John', username: 'Doe' } //Using dot notation console.log(obj.id); //Result: // 1 //Using bracket notation console.log(obj['name']); //Result: //John
const obj = { id: 1, name: 'John', username: 'Doe' } //Using dot notation console.log(obj.id); //Result: // 1 //Using bracket notation console.log(obj['name']); //Result: //John