Object Type Error on CodePen

I am Struggling with this Object type, the first object type I created worked but what I don’t understand is why the second object is not working all.

Any help would appreciated


Take a closer look at the capitalization in the second case.

1 Like

I just checked it now and the result is the same

name has special meaning in JavaScript as it is already identified as the same thing as window.name. You can either change the variable name to something else or you can use const to declare it instead of var.


thank you @RandellDawson , that worked

I didn’t know about the name type in JavaScript

There’s always something new to learn from experienced developers

1 Like

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