Create a Method on an Object (punctuation?)

Tell us what’s happening:

Your code so far

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


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:

Your sayLegs function returns the string “This dog has 4 legs.4.” instead of “This dog has 4 legs.”

1 Like