I've trying to use the EcmaScript 6 feature of adding variables in quotes using:
'Sample Text ${variable}'
On the following code:
Cat.prototype.info = function(){
console.log('Name: ${this.name}');
console.log('Gender: '+this.gender);
console.log('Color: '+this.color);
console.log('Breed: '+this.breed);
console.log('Emotion: '+this.emotion);
console.log('Action: '+this.action);
};
However I only get literal code as String when logging out out on console.
Is there a Mistake I'm making? Or my web browser or IDE doesn't support that feature?