Skip to content

Commit a8f97f3

Browse files
Merge pull request #20 from clayliddell/patch-1
Fixed minor typo
2 parents c112a69 + aa65cb4 commit a8f97f3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

ebook/03_default_function_arguments.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ const bill = calculatePrice({ tip: 0.15, total:150 });
8888
// 187.5
8989
```
9090

91-
const bill = calculatePrice({ tip: 0.15, total:150 });
92-
// 187.5
93-
```
94-
9591
We made the argument of our function an Object and when calling the function we don't even have to worry about the order of the parameters because they will be matched based on their key.
9692

9793
In the example above the default value for *tip* was 0.05 and we overwrote it with 0.15 but we didn't give a value to tax which remained the default 0.1.

0 commit comments

Comments
 (0)