1. Getting the right order while printing the MRO of class D but not geting the constructor call of class C. Question: why not printing C constructor after A constructor in the given code below ?
stack.push(2); // stack is now [2]
stack.push(5); // stack is now [2, 5]
var i = stack.pop(); // stack is now [2]
alert(i); // displays 5
var queue = [];
queue.push(2); // queue is now [2]
queue.push(5); // queue is now [2, 5]
var i = queue.shift(); // queue is now [5]
alert(i); // displays 2
Modified 1 min ago P8ul
| 7 | 6 | 13 |
| Votes | Answers | Views |
|
|
|
|
1. Answer
Modified 1 min ago P8ul
1. Getting the right order while printing the MRO of class D but not geting the constructor call of class C. Question: why not printing C constructor after A constructor in the given code below ?
stack.push(2); // stack is now [2]
stack.push(5);
Comments
I can't explain it so i don't post an answer, but the way to solve it is tochange
class D(B,C): to class D(C)
Add a comment
Comments
I can't explain it so i don't post an answer, but the way to solve it is tochange
class D(B,C):toclass D(C)Add a comment