Skip to content

Commit 9e3cda3

Browse files
author
Benjamin De Cock
committedJun 1, 2015
Better variables example
1 parent 66fd95f commit 9e3cda3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
 

‎README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ HTML5 provides us with lots of semantic elements aimed to describe precisely the
3030
</main>
3131
```
3232

33-
Make sure you understand the semantic of the elements you're using. It's worse to use a semantic
33+
Make sure you understand the semantics of the elements you're using. It's worse to use a semantic
3434
element in a wrong way than staying neutral.
3535

3636
```html
@@ -730,13 +730,12 @@ Favor `const` over `let` and `let` over `var`.
730730

731731
```javascript
732732
// bad
733-
var obj = {};
734-
obj["foo" + "bar"] = "baz";
733+
var me = new Map();
734+
me.set("name", "Ben").set("country", "Belgium");
735735

736736
// good
737-
const obj = {
738-
["foo" + "bar"]: "baz"
739-
};
737+
const me = new Map();
738+
me.set("name", "Ben").set("country", "Belgium");
740739
```
741740

742741
### Conditions

0 commit comments

Comments
 (0)
Please sign in to comment.