Skip to content

Commit 181a416

Browse files
committed
Make the comments match the variable names in prototype chaining
1 parent 0291534 commit 181a416

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

topics/about_prototype_chain.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ child.b = 2;
2626
* ---------------------- ---- ---- ----
2727
* */
2828

29-
test("Is there an 'a' and 'b' own property on childObj?", function () {
30-
equals(child.hasOwnProperty('a'), __, 'childObj.hasOwnProperty(\'a\')?');
31-
equals(child.hasOwnProperty('b'), __, 'childObj.hasOwnProperty(\'b\')?');
29+
test("Is there an 'a' and 'b' own property on child?", function () {
30+
equals(child.hasOwnProperty('a'), __, 'child.hasOwnProperty(\'a\')?');
31+
equals(child.hasOwnProperty('b'), __, 'child.hasOwnProperty(\'b\')?');
3232
});
3333

34-
test("Is there an 'a' and 'b' property on childObj?", function () {
34+
test("Is there an 'a' and 'b' property on child?", function () {
3535
equals(child.a, __, 'what is \'a\' value?');
3636
equals(child.b, __, 'what is \'b\' value?');
3737
});
@@ -42,22 +42,22 @@ test("If 'b' was removed, whats b value?", function () {
4242
});
4343

4444

45-
test("Is there a 'c' own property on childObj?", function () {
46-
equals(child.hasOwnProperty('c'), __, 'childObj.hasOwnProperty(\'c\')?');
45+
test("Is there a 'c' own property on child?", function () {
46+
equals(child.hasOwnProperty('c'), __, 'child.hasOwnProperty(\'c\')?');
4747
});
4848

49-
// Is there a 'c' own property on childObj? No, check its prototype
50-
// Is there a 'c' own property on childObj.[[Prototype]]? Yes, its value is...
51-
test("Is there a 'c' property on childObj?", function () {
52-
equals(child.c, __, 'what is the value of childObj.c?');
49+
// Is there a 'c' own property on child? No, check its prototype
50+
// Is there a 'c' own property on child.[[Prototype]]? Yes, its value is...
51+
test("Is there a 'c' property on child?", function () {
52+
equals(child.c, __, 'what is the value of child.c?');
5353
});
5454

5555

56-
// Is there a 'd' own property on childObj? No, check its prototype
57-
// Is there a 'd' own property on childObj.[[Prototype]]? No, check it prototype
58-
// childObj.[[Prototype]].[[Prototype]] is null, stop searching, no property found, return...
59-
test("Is there an 'd' property on childObj?", function () {
60-
equals(child.d, __, 'what is the value of childObj.d?');
56+
// Is there a 'd' own property on child? No, check its prototype
57+
// Is there a 'd' own property on child.[[Prototype]]? No, check it prototype
58+
// child.[[Prototype]].[[Prototype]] is null, stop searching, no property found, return...
59+
test("Is there an 'd' property on child?", function () {
60+
equals(child.d, __, 'what is the value of child.d?');
6161
});
6262

6363

0 commit comments

Comments
 (0)