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
test("Is there an 'a' and 'b' property on child?",function(){
35
-
equal(__,child.a,'what is \'a\' value?');
36
-
equal(__,child.b,'what is \'b\' value?');
36
+
equal(1,child.a,'what is \'a\' value?');
37
+
equal(2,child.b,'what is \'b\' value?');
37
38
});
38
39
40
+
//Question 53 states that if the b vlue in child was removed what would be the b value now. In this case, it would be the father's b value which is [3]//
39
41
test("If 'b' was removed, whats b value?",function(){
40
42
deletechild.b;
41
-
equal(__,child.b,'what is \'b\' value now?');
43
+
equal(3,child.b,'what is \'b\' value now?');
42
44
});
43
45
44
-
46
+
//Question 54 asks whether the child variable contains a c value? [false]//
45
47
test("Is there a 'c' own property on child?",function(){
//Question 55 asks about prototype. A prototype is located outside of the function and it alllows you to make all functions complete what is in the prototype without having it copied within each function. The prototype states that c is 4, so running the prototype with child gives [4]//
49
52
// Is there a 'c' own property on child? No, check its prototype
50
53
// Is there a 'c' own property on child.[[Prototype]]? Yes, its value is...
51
54
test("Is there a 'c' property on child?",function(){
52
-
equal(__,child.c,'what is the value of child.c?');
55
+
equal(4,child.c,'what is the value of child.c?');
53
56
});
54
57
55
-
58
+
//Question 56 asks about a prototype property that does not exist. What will be the output if you ask for prototype property that does not exist. It is undefined.//
56
59
// Is there a 'd' own property on child? No, check its prototype
57
60
// Is there a 'd' own property on child.[[Prototype]]? No, check it prototype
58
61
// child.[[Prototype]].[[Prototype]] is null, stop searching, no property found, return...
59
62
test("Is there an 'd' property on child?",function(){
60
-
equal(__,child.d,'what is the value of child.d?');
63
+
equal(undefined,child.d,'what is the value of child.d?');
0 commit comments