Suggestion for ES6 lesson

In the ES6 lesson “Write Concise Declarative Functions with ES6”, the ES5 example has ES6 code in it.
I’m aware that the syntax being demonstrated is indeed ES5, but wouldn’t it make the example more accurate if the entire example would be ES5?

The current example:

const person = {
name: "Taylor",
sayHello: function() {
return `Hello! My name is ${this.name}.`;
}
};

Suggestion for fully ES5:

var person = {
name: "Taylor",
sayHello: function() {
return 'Hello! My name is ' + this.name + '.';
}
};
3 Likes