Level 9 lesson 9. Why is giving me an error?
Please, see my code below:
let player = {
name: "default_name",
weapon: "Pistol",
exp: "Pro",
// defining method
setName: function(name) {
this.name = name;
},
getName: function() {
return this.name;
},
showInfo: function() {
console.log(`${this.name} uses ${this.weapon} and is ${this.exp} level player in STBattleRoyal`);
}
};
player.setName("John Wick");
player.showInfo();
This is the error: Check if the first template literal is specified correctly.