Objec oriented challenge

why is this code not passing? even when it printed what it ought to print on the console .log

  **Your code so far**

let dog = {
name: "Spot",
numLegs: 4,
sayLegs: function() {
return "This dog has  " + dog.numLegs + " legs.";
}
};

console.log(dog.sayLegs());
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Challenge: Create a Method on an Object

Link to the challenge:

I see a spacing problem in the string that you are returning. Paying close attention to details is very important in dev work.

1 Like

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