Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![mon Wil](https://secure.gravatar.com/avatar/c20d16910801e484b3b9a4cb0dadf2ad?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
mon Wil
2,007 Pointswhat would the answer be for the quiz of creating a new variable name for [blank shipsLeft = 10 ] thanks
For the quiz on varaible name - JavaScript Basics
1 Answer
![Busra Tokuc](https://secure.gravatar.com/avatar/9eb78f6d35eb155982c0a8cc9b21a640?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Busra Tokuc
7,444 PointsHi, to create a variable you should use one of these keywords- var, let or const. In that quiz, you can choose one of them as an answer.
In general, there are some differences between them. I wrote the main differences for you. Please check this article for more details.
- var - can be updated and re-declared. Likely to cause a lot of bugs in your code.
- let - can be updated but not re-declared.
- const - cannot be updated or re-declared.
So stick with let and const at your project to prevent unexpected errors.
mon Wil
2,007 Pointsmon Wil
2,007 PointsAhh okay I was over thinking the question. Trying to come up with a new Variable name haha! All I needed to do was use var. Thanks Busra!