Skip to content

Commit acb96dd

Browse files
committed
Merge branch 'master' of github.com:javascript-tutorial/en.javascript.info into sync-ff042a03
2 parents ee4c641 + ff042a0 commit acb96dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

1-js/04-object-basics/01-object/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ alert( *!*key*/!* in user ); // true, takes the name from key and checks for suc
322322
```
323323
324324
````smart header="Using \"in\" for properties that store `undefined`"
325-
Usually, the strict comparison `"=== undefined"` check the property existance just fine. But there's a special case when it fails, but `"in"` works correctly.
325+
Usually, the strict comparison `"=== undefined"` check the property existence just fine. But there's a special case when it fails, but `"in"` works correctly.
326326
327327
It's when an object property exists, but stores `undefined`:
328328

1-js/11-async/02-promise-basics/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ The function passed to `new Promise` is called the *executor*. When `new Promise
2626

2727
Its arguments `resolve` and `reject` are callbacks provided by JavaScript itself. Our code is only inside the executor.
2828

29-
When the executor obtains the result, be it soon or late - doesn't matter, it should call one of these callbacks:
29+
When the executor obtains the result, be it soon or late, doesn't matter, it should call one of these callbacks:
3030

3131
- `resolve(value)` — if the job finished successfully, with result `value`.
3232
- `reject(error)` — if an error occurred, `error` is the error object.
3333

34-
So to summarize: the executor runs automatically and performs a job. Then it should call `resolve` if it was succssful or `reject` if there was an error.
34+
So to summarize: the executor runs automatically and attempts to perform a job. When it is finished with the attempt it calls `resolve` if it was successful or `reject` if there was an error.
3535

36-
The `promise` object returned by the `new Promise` constructor has internal properties:
36+
The `promise` object returned by the `new Promise` constructor has these internal properties:
3737

3838
- `state` — initially `"pending"`, then changes to either `"fulfilled"` when `resolve` is called or `"rejected"` when `reject` is called.
3939
- `result` — initially `undefined`, then changes to `value` when `resolve(value)` called or `error` when `reject(error)` is called.

0 commit comments

Comments
 (0)