I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
First, you are trying to access that number with dog.numLegs. But that doesn’t exist since it is being created. That’s OK - an object can refer to itself with the keyword this. So, inside the object, if I wanted to refer to the name property, it would be this.name.
The other problem is that with that fix, your string is still missing a space character (in the proper place).
When I make those two changes, your code passes for me.
You do not need to use this at this point. The only problem was the space in the text string. I was getting ahead of myself.
As to just hardcoding the answer in, yes, that will work. That is a flaw in the test, but of course, if the goal is to learn, it would not be a good idea to exploit that flaw.