Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Add missing curly brace. Typo fix for a module import. #240

Merged
merged 13 commits into from
Apr 11, 2016
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/Iterators and Generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ for (let i in list) {

for (let i of list) {
console.log(i); // "4", "5", "6"
}
```

Another distinction is that `for..in` operates on any object; it serves as a way to inspect properties on this object.
Expand Down
2 changes: 1 addition & 1 deletion pages/Symbols.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Just like strings, symbols can be used as keys for object properties.
```ts
let sym = Symbol();

let obj = {};
let obj: any = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change it to:

let obj = {
   [sym]: "value"
};

console.log(obj[sym]); // "value"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same idea actually, good call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only thing is that we never explained computer properties 😄


obj[sym] = "value";
console.log(obj[sym]); // "value"
Expand Down