We need to use this to be able to use variables in the local scope of the object
//Objects
//keyword this
//Object example
let user = {
name: 'Gary',
lastName: 'Fitzwater',
age: 50,
cars: ['BMW', 'Audi'],
misc: {
hobbies: ['skating', 'boxing'],
lang: 'arabic'
},
salute: function(){
console.log(`Hi there I am ${this.name} I am ${this.age} years old`);
}
};
user.salute();