Commit graph

109 commits

Author SHA1 Message Date
LeviDing
80eb70fd90
Update article.md 2020-11-15 22:27:03 +08:00
LeviDing
358c38988d
Update article.md 2020-11-15 22:23:11 +08:00
LeviDing
5b63e81e4e
Update article.md 2020-11-15 22:12:00 +08:00
Ilya Kantor
dccca58f26
Update article.md 2020-11-01 09:54:02 +03:00
Ilya Kantor
010bde1a97
Update article.md 2020-11-01 09:50:38 +03:00
Ilya Kantor
0e0f4e35a2
Update article.md 2020-11-01 09:24:12 +03:00
Vse Mozhe Buty
7ee9c6a9e1
Fix links in 1.8.4 (Prototype methods)
Current links are 404.
2020-10-25 18:40:42 +02:00
LeviDing
4131b29d7d
FIX: delete extra space 2020-10-19 09:26:53 +08:00
Ilya Kantor
edc6126980
Merge pull request #2024 from lumosmind/patch-47
One line of code creates a lot of confusing
2020-09-05 18:06:54 +03:00
Mustafa Kemal Tuna
7d0d65478d
clarifying example code
An interesting question may arise in the example above: what’s the value of this inside set fullName(value)? Where are the properties this.name and this.surname written: into user or admin?

The answer is simple: this is not affected by prototypes at all.

No matter where the method is found: in an object or its prototype. In a method call, this is always the object before the dot.

So, the setter call admin.fullName= uses admin as this, not user.

That is actually a super-important thing, because we may have a big object with many methods, and have objects that inherit from it. And when the inheriting objects run the inherited methods, they will modify only their own states, not the state of the big object.

The example code doesn't show these concepts. Also, these additions can make readers ask questions before the explanation of the example code.
2020-07-25 05:38:45 +03:00
Mustafa Kemal Tuna
8f3831be1c
One line of code creates a lot of confusing
"// obj.toString === obj.__proto__.toString == Object.prototype.toString"
It is look like JS code but it gives different result from what we want to get.
There is different kind of equality operator ant these give more confusing what is the purpose of these?
It can be better to separate this line into 2 line of code to make it sensible and readable.
Subject and code is already hard but there is no need to make readers ask unnecessary questions.
2020-07-23 13:51:13 +03:00
Ilya Kantor
04c0570e22
Merge pull request #1974 from akymtl/patch-3
Update article.md
2020-07-18 14:15:51 +03:00
Dalibor Pasalic
38526232a6
8.4 Prototype methods... - Fix code typo
Move comma before square bracket
Object.create(proto[, descriptors])
2020-07-10 08:32:18 +02:00
Akshay Mittal
1b1b07edac
Update article.md
minor typo fix
2020-06-28 00:24:10 +05:30
Ilya Kantor
30c9c32cd7 minor fixes 2020-06-08 10:59:06 +03:00
Ilya Kantor
b057341f6c refactor objects, add optional chaining 2020-05-03 16:56:24 +03:00
Peter Roche
d65141d44b
That's a getter/setter for it -> It's a getter/setter for it 2020-04-22 17:34:59 -06:00
Peter Roche
62299ed853
do the same => do the same thing 2020-03-29 16:26:02 -06:00
Ilya Kantor
94b9c9d776 minor fixes 2020-03-21 09:11:53 +03:00
Ilya Kantor
f9feec2d69 minor fixes 2020-02-04 16:43:35 +00:00
Ilya Kantor
4587fde235 re-import images (Sketch update) 2019-11-30 08:51:52 +03:00
Ilya Kantor
d048324744
Merge pull request #1505 from hrodward/patch-25
Update article.md
2019-10-26 08:41:20 +03:00
Ilya Kantor
fac4413c60
Merge pull request #1504 from hrodward/patch-24
Update article.md
2019-10-25 14:20:31 +03:00
Alexey Pyltsyn
29ea8907d1
Merge branch 'master' into patch-18 2019-10-22 11:07:52 +03:00
Peter Roche
c07eb5c29a
Update article.md
3 commas and a period.
2019-10-22 01:44:17 -06:00
hrodward
a04d80c206
Update article.md
Grammar suggestions
2019-10-22 08:47:30 +02:00
hrodward
62193385b6
Update article.md
Grammar suggestions
2019-10-22 07:43:55 +02:00
hrodward
d0b95aa8df
Update 1-js/08-prototypes/01-prototype-inheritance/article.md
Co-Authored-By: Alexey Pyltsyn <lex61rus@gmail.com>
2019-10-22 05:20:59 +02:00
Ilya Kantor
040aea0270
Merge pull request #1497 from hrodward/patch-23
Update task.md
2019-10-21 16:18:06 +03:00
Ilya Kantor
5aea931325
Merge pull request #1496 from hrodward/patch-22
Update article.md
2019-10-21 16:17:49 +03:00
Ilya Kantor
50aa158c02
Merge pull request #1495 from hrodward/patch-21
Update task.md
2019-10-21 16:17:24 +03:00
Ilya Kantor
e661044558
Merge pull request #1494 from hrodward/patch-20
Update task.md
2019-10-21 16:17:06 +03:00
hrodward
4bb52fb046
Update task.md
Grammar
2019-10-21 13:46:15 +02:00
hrodward
89c4a0fca9
Update article.md
Grammar
2019-10-21 12:26:24 +02:00
hrodward
c0fd76be3d
Update task.md
Grammar
2019-10-21 11:52:48 +02:00
hrodward
7500898467
Update task.md
Grammar
2019-10-21 11:48:46 +02:00
hrodward
906dd131f1
Update task.md
Grammar
2019-10-21 11:43:39 +02:00
hrodward
3c8ae3090d
Update article.md
Grammar
2019-10-21 11:41:14 +02:00
paroche
86912bce10
Update article.md
Long awaited second stab at revising this paragraph (which someone in the distant past took issue with).
2019-10-12 21:10:13 -06:00
Ilya Kantor
a7e2c43564 minor 2019-10-11 09:13:22 +03:00
Ilya Kantor
7418213b66 re-import images from Sketch (no changes) 2019-10-10 17:08:16 +03:00
Ilya Kantor
f1d070f517
Merge pull request #1413 from paroche/patch-44
Update article.md
2019-10-07 04:48:20 +03:00
Ilya Kantor
c0d8fdbfff
Merge branch 'master' into patch-47 2019-10-07 04:46:50 +03:00
paroche
918227fcba
Update article.md
Replaced ":"s with ","s. 

I edited these lines before, and thought they were a little awkward w/ ":"s, but didn't see fit to change it then. But now ","s seem clearly better. Think of it as successive approximations.
2019-10-03 18:42:06 -06:00
paroche
25b414d182
Update article.md
Replaced 'the ... property ... works since" with "the ... property ... has worked since".
2019-10-03 18:36:59 -06:00
paroche
73c20d8220
Update article.md
Give results of 'alert' ('true') rather than description of method. Code seems pretty self-explanatory.
2019-10-03 18:30:18 -06:00
paroche
fea92bb331
Update article.md
Replace 'cause' with 'case'.
2019-10-02 22:55:47 -06:00
Ilya Kantor
20c592f95e closes #1387 2019-10-02 10:42:54 +03:00
Violet.Lee
bee66cb4c2
minor 2019-10-01 23:59:31 +09:00
Ilya Kantor
2400b4097a
Merge pull request #1388 from paroche/patch-43
Update article.md
2019-09-29 13:43:23 +03:00