Can anyone tell me why the Class Property values don't appear in Console when i execute this code? Many thanks.
class Pessoa
{
constructor(nome, idade)
{
this.nome = nome;
this.idade = idade;
}
Info()
{
console.log('O meu nome é ${this.nome} e tenho ${this.idade} anos.');
}
}
p1 = new Pessoa("Pedro", 49);
p1.Info();