Skip to content

Commit b6b5b21

Browse files
authored
expected output が実際の出力と match しない (#667)
[110, 220, 330, 440, 550] -> 120,240,360,480,600 document.write の出力形式に合わせ、浮動小数点誤差をなくすため taxRate を2倍した
1 parent b8f1b68 commit b6b5b21

File tree

1 file changed

+2
-2
lines changed
  • docs/2-browser-apps/04-anonymous-function

1 file changed

+2
-2
lines changed

docs/2-browser-apps/04-anonymous-function/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ const add3 = function (a, b) {
8181

8282
```javascript
8383
const pricesWithoutTax = [100, 200, 300, 400, 500];
84-
const taxRate = 0.1;
84+
const taxRate = 0.2;
8585
const pricesWithTax = pricesWithoutTax.map((price) => {
8686
return price * (1 + taxRate);
8787
});
88-
document.write(pricesWithTax); // [110, 220, 330, 440, 550]
88+
document.write(pricesWithTax); // 120,240,360,480,600
8989
```
9090

9191
:::tip[プリミティブ値のラッパーオブジェクト]

0 commit comments

Comments
 (0)