В чем отличие контекста function и стрелочной функции?
Почему, если изменить метод logInfo таким образом, то ничего не получим?
logInfo: () => {
console.log(`Name is ${this.name}`);
}
function hello() {
console.log('Hello', this);
}
const person = {
name: 'Misha',
age: 20,
sayHello: hello.bind(document),
logInfo: function() {
console.log(Name is ${this.name});
}
};
person.logInfo();