Skip to content

Commit

Permalink
Fix some typos in a snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Aug 2, 2024
1 parent a6ee62e commit e575692
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions content/snippets/js/s/modeling-money-currency-exchange-rates.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class Bank {

exchange(money, to) {
if (!(money instanceof Money))
throw new TypeError(`#{money} is not an instance of Money`);
throw new TypeError(`${money} is not an instance of Money`);

const toCurrency = Currency.wrap(to);
if (toCurrency === money.currency) return money;
Expand Down Expand Up @@ -306,7 +306,7 @@ class Money {
this.value = Number.parseFloat(value);
this.currency = Currency.wrap(currency);
if (!(bank instanceof Bank))
throw new TypeError(`#{bank} is not an instance of Bank`);
throw new TypeError(`${bank} is not an instance of Bank`);
this.bank = bank;
}

Expand Down Expand Up @@ -339,7 +339,7 @@ class Money {
this.value = Number.parseFloat(value);
this.currency = Currency.wrap(currency);
if (!(bank instanceof Bank))
throw new TypeError(`#{bank} is not an instance of Bank`);
throw new TypeError(`${bank} is not an instance of Bank`);
this.bank = bank;
}

Expand Down Expand Up @@ -498,7 +498,7 @@ class Bank {

exchange(money, to) {
if (!(money instanceof Money))
throw new TypeError(`#{money} is not an instance of Money`);
throw new TypeError(`${money} is not an instance of Money`);

const toCurrency = Currency.wrap(to);
if (toCurrency === money.currency) return money;
Expand All @@ -523,7 +523,7 @@ class Money {
this.value = Number.parseFloat(value);
this.currency = Currency.wrap(currency);
if (!(bank instanceof Bank))
throw new TypeError(`#{bank} is not an instance of Bank`);
throw new TypeError(`${bank} is not an instance of Bank`);
this.bank = bank;
}

Expand Down

0 comments on commit e575692

Please sign in to comment.