Question about code in chapter 1 second edition

Hi, in chapter one when I was coding a square/cube on page 7 it didn’t do anything. I think it didn’t do anything because we used the same variable name for the sphere and square/cube. When I typed the code for the sphere it worked, but as soon as I typed var shape = new then the sphere went away. I finished typing the code for the square/cube and it was blank. I tried changing the name of the variable but it didn’t work. Could you please help me?

Hi Nicholas!

It sounds as if there is just a minor typo in the code that you’ve typed. You might try comparing what you’ve typed with the code in the back of the book. It might be something as simple as a misspelling or maybe some letters aren’t capitalized as they need to be.

If you’d like me to look it over, I’d be happy to. You can use the share link feature in 3DE to paste a link to your code here. You can also read through some more suggestions here.

Not to worry – we can definitely get it working :slight_smile: