let shop = {
money(){
this.money = +prompt('How much money do you have? **In dollars**', 0)
},
grab(){
this.clothes = {
boots: 200,
cap: 12,
glasses: 400,
'T-shirt': 500
}
},
check(){
if (this.money){
alert(`Your remains: ${this.money}. Have a nice day :)`)
}else{
alert('You have not enough money.')
}
}
};
shop.money()
shop.grab.clothes.boots
object.elem //(object = {elem: value})
object[elem] //(object = {elem: value})
object.method() (object = {method: ()=>{return true}})
object.method().method2()