In my main.js file, I created a class using "use strict" like so:
class Account{
constructor(currency){
this.balance = 0;
this.currency = currency;
}
.......
toString(){
console.log("The balance is: ${this.currency} ${this.balance}.");
//console.log("The balance is: ", this.currency, this.balance);
}
}
let acc1 = new Account("USD");
When I run `acc1.toString()` in the console, the method of directly inserting variables with ${ } does not work. The second way works correctly.