Skip to content

Commit 0a5d71d

Browse files
authored
Update article.md
1 parent 9365275 commit 0a5d71d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ That can become a source of bugs and even vulnerabilies if we intent to store ar
226226
227227
In that case the visitor may choose "__proto__" as the key, and the assignment logic will be ruined (as shown above).
228228
229-
There exist a way to make objects treat `__proto__` as a regular property, we'll cover it later, but first we need to know more about objects to understand it.
229+
There is a way to make objects treat `__proto__` as a regular property, which we'll cover later, but first we need to know more about objects.
230230
There's also another data structure [Map](info:map-set-weakmap-weakset), that we'll learn in the chapter <info:map-set-weakmap-weakset>, which supports arbitrary keys.
231231
````
232232

@@ -370,7 +370,7 @@ Also, we could use another variable name here instead of `key`. For instance, `"
370370
371371
### Ordered like an object
372372
373-
Are objects ordered? In other words, if we loop over an object, do we get all properties in the same order that they are added in it? Can we rely on it?
373+
Are objects ordered? In other words, if we loop over an object, do we get all properties in the same order they were added? Can we rely on this?
374374
375375
The short answer is: "ordered in a special fashion": integer properties are sorted, others appear in creation order. The details follow.
376376
@@ -514,7 +514,7 @@ admin.name = 'Pete'; // changed by the "admin" reference
514514
alert(*!*user.name*/!*); // 'Pete', changes are seen from the "user" reference
515515
```
516516
517-
The example above demonstrates that there is only one object. Like if we had a cabinet with two keys and used one of them (`admin`) to get into it. Then, if we later use the other key (`user`) we would see changes.
517+
The example above demonstrates that there is only one object. As if we had a cabinet with two keys and used one of them (`admin`) to get into it. Then, if we later use the other key (`user`) we would see changes.
518518
519519
### Comparison by reference
520520
@@ -541,7 +541,7 @@ let b = {}; // two independent objects
541541
alert( a == b ); // false
542542
```
543543
544-
For comparisons like `obj1 > obj2` or for a comparison against a primitive `obj == 5`, objects are converted to primitives. We'll study how object conversions work very soon, but to say the truth, such comparisons are necessary very rarely and usually are a result of a coding mistake.
544+
For comparisons like `obj1 > obj2` or for a comparison against a primitive `obj == 5`, objects are converted to primitives. We'll study how object conversions work very soon, but to tell the truth, such comparisons are necessary very rarely and usually are a result of a coding mistake.
545545
546546
### Const object
547547
@@ -739,4 +739,4 @@ There are many other kinds of objects in JavaScript:
739739
740740
They have their special features that we'll study later. Sometimes people say something like "Array type" or "Date type", but formally they are not types of their own, but belong to a single "object" data type. And they extend it in various ways.
741741
742-
Objects in JavaScript are very powerful. Here we've just scratched the surface of the topic that is really huge. We'll be closely working with objects and learning more about them in further parts of the tutorial.
742+
Objects in JavaScript are very powerful. Here we've just scratched the surface of a topic that is really huge. We'll be closely working with objects and learning more about them in further parts of the tutorial.

0 commit comments

Comments
 (0)