You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/08-prototypes/01-prototype-inheritance/article.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ In JavaScript, objects have a special hidden property `[[Prototype]]` (as named
12
12
13
13

14
14
15
-
When we read a property from `object`, and it's missing, JavaScript automatically takes it from the prototype. In programming, such thing is called "prototypal inheritance". And soon we'll study many examples of such inheritance, as well as cooler language features built upon it.
15
+
When we read a property from `object`, and it's missing, JavaScript automatically takes it from the prototype. In programming, such thing is called "prototypal inheritance". And soon we'll study many examples of such inheritance, as well as cooler language features built upon it.
16
16
17
17
The property `[[Prototype]]` is internal and hidden, but there are many ways to set it.
18
18
@@ -133,11 +133,11 @@ Also it may be obvious, but still: there can be only one `[[Prototype]]`. An obj
133
133
134
134
135
135
```smart header="`__proto__` is a historical getter/setter for `[[Prototype]]`"
136
-
It's a common mistake of novice developers not to know the difference between these two.
136
+
It's a common mistake of novice developers not to know the difference between these two.
137
137
138
-
Please note that `__proto__` is *not the same* as the internal `[[Prototype]]` property. It's a getter/setter for `[[Prototype]]`. Later we'll see situations where it matters, for now let's just keep it in mind, as we build our understanding of JavaScript language.
138
+
Please note that `__proto__` is *not the same* as the internal `[[Prototype]]` property. It's a getter/setter for `[[Prototype]]`. Later we'll see situations where it matters, for now let's just keep it in mind, as we build our understanding of JavaScript language.
139
139
140
-
The `__proto__` property is a bit outdated. It exists for historical reasons, modern JavaScript suggests that we should use `Object.getPrototypeOf/Object.setPrototypeOf` functions instead that get/set the prototype. We'll also cover these functions later.
140
+
The `__proto__` property is a bit outdated. It exists for historical reasons, modern JavaScript suggests that we should use `Object.getPrototypeOf/Object.setPrototypeOf` functions instead that get/set the prototype. We'll also cover these functions later.
141
141
142
142
By the specification, `__proto__` must only be supported by browsers. In fact though, all environments including server-side support `__proto__`, so we're quite safe using it.
Copy file name to clipboardExpand all lines: 1-js/11-async/06-promisify/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ As we can see, the new function is a wrapper around the original `loadScript` fu
50
50
51
51
Now `loadScriptPromise` fits well in promise-based code. If we like promises more than callbacks (and soon we'll see more reasons for that), then we will use it instead.
52
52
53
-
In practice we may need to promisify more than one function, so it makes sense to use a helper.
53
+
In practice we may need to promisify more than one function, so it makes sense to use a helper.
54
54
55
55
We'll call it `promisify(f)`: it accepts a to-promisify function `f` and returns a wrapper function.
Copy file name to clipboardExpand all lines: 1-js/12-generators-iterators/2-async-iterators-generators/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -363,7 +363,7 @@ More explanations about how it works:
363
363
- The initial URL is `https://api.github.com/repos/<repo>/commits`, and the next page will be in the `Link` header of the response.
364
364
- The `fetch` method allows us to supply authorization and other headers if needed -- here GitHub requires `User-Agent`.
365
365
2. The commits are returned inJSON format.
366
-
3. We should get the next page URL from the `Link` header of the response. It has a special format, so we use a regular expression forthat (we will lernthis feature in [Regular expressions](info:regular-expressions)).
366
+
3. We should get the next page URL from the `Link` header of the response. It has a special format, so we use a regular expression forthat (we will learnthis feature in [Regular expressions](info:regular-expressions)).
367
367
- The next page URL may look like `https://api.github.com/repositories/93253246/commits?page=2`. It's generated by GitHub itself.
368
368
4. Then we yield the received commits one by one, and when they finish, the next `while(url)` iteration will trigger, making one more request.
Copy file name to clipboardExpand all lines: 5-network/06-fetch-api/article.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,8 +217,8 @@ Normally, when a document is unloaded, all associated network requests are abort
217
217
218
218
It has a few limitations:
219
219
220
-
- We can't send megabytes: the body limit for `keepalive` requests is 64kb.
220
+
- We can't send megabytes: the body limit for `keepalive` requests is 64KB.
221
221
- If we need to gather a lot of statistics about the visit, we should send it out regularly in packets, so that there won't be a lot left for the last `onunload` request.
222
-
- This limit applies to all `keepalive` requests together. In other words, we can perform multiple `keepalive` requests in parallel, but the sum of their body lengths should not exceed 64kb.
223
-
- We can't handle the server response if the document is unloaded. So in our example `fetch` will succeed due to `keepalive`, but subsequent functions won't work.
222
+
- This limit applies to all `keepalive` requests together. In other words, we can perform multiple `keepalive` requests in parallel, but the sum of their body lengths should not exceed 64KB.
223
+
- We can't handle the server response if the document is unloaded. So in our example `fetch` will succeed due to `keepalive`, but subsequent functions won't work.
224
224
- In most cases, such as sending out statistics, it's not a problem, as server just accepts the data and usually sends an empty response to such requests.
Copy file name to clipboardExpand all lines: 5-network/10-long-polling/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ As you can see, `subscribe` function makes a fetch, then waits for the response,
70
70
```warn header="Server should be ok with many pending connections"
71
71
The server architecture must be able to work with many pending connections.
72
72
73
-
Certain server architectures run one process per connection; resulting in there being as many processes as there are connections, while each process consumes quite a bit of memory. So, too many connections will just consume it all.
73
+
Certain server architectures run one process per connection, resulting in there being as many processes as there are connections, while each process consumes quite a bit of memory. So, too many connections will just consume it all.
74
74
75
75
That's often the case for backends written in languages like PHP and Ruby.
0 commit comments