16/30 Nothing is being printed



Codecademy says that the code is right. However, nothing is being printed on the console.

// create your Animal class here
function Animal(name, numLegs){
    this.name = name;
    this.numLegs = numLegs;

// create the sayName method for Animal

Animal.prototype.sayName = function(){
    console.log("Hi my name is" + " " + this.name);

// provided code to test above constructor and method
var penguin = new Animal("Captain Cook", 2);


Codecademy environment is quite buggy and laggy. You can always test your code in the different environment -> https://repl.it/CyZm


Thanks! It prints when I try it on that link.


You're very welcome! :slight_smile:


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