Skip to content

Commit 0feb81d

Browse files
author
Guntbert Reiter
authored
Fix typo in template literal example
the example makes only sense when the same variable name is used in both lines
1 parent 50c454a commit 0feb81d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ebook/04_template_literals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The syntax for a ternary operator looks like this:
9595
```js
9696
const isDiscounted = false
9797

98-
return isFridgeEmpty ? "$10" : "$20"
98+
return isDiscounted ? "$10" : "$20"
9999
// $20
100100
```
101101

0 commit comments

Comments
 (0)