Intro to Objects II, #20: Emperor is broken based on browsers


This will work in Firefox, but not in Chrome. Screenshot:


function Penguin(name, numLegs) { = name;
    this.numLegs = 2;

// create your Emperor class here and make it inherit from Penguin

function Emperor(name) { = name;

Emperor.prototype = new Penguin();

var emperor = new Emperor("Emp");


Unable to reproduce this error in Chrome/Windows 7. As we can see, I am behind the times (why toss aside Windows Professional?) so cannot speak for later versions of Windows.

In the screenshots we can see that nothing is logged making the error message legit. Tough to say how it came about, though.


Also on Windows 7. I know nothing is logged, but the exact same code is in both browsers. I copied and pasted it back and forth.

edit: just tried again and it worked now. That's odd. Some other people in a different thread mentioned browser-related problems with this question too.


The intermittency makes it difficult to nail down a cause. Being one of the original courses means it will not get another audit. Good that you could get passed and move on.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.