let person = {
name : 'John Doe',
age : 35
}
//Now we can add element by 2 ways
person.occupation = 'Web Designer'
//or
person['occupation'] = 'Web Designer'; //This is usefull for adding element within loop.
object[yourKey] = yourValue;
object.yourKey = yourValue;
const favoriteThings = {
band: 'caravan palace',
food: 'fried pickles',
}
//object notation
favoriteThings.car = 'my car'
//bracket notation
favoriteThings['car'] = 'my car'