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

JavaScript

I don't get this quiz question? Finish the code below to create a variable named shipsLeft containing the number 10.

Finish the code below to create a variable named shipsLeft containing the number 10.

________ shipsLeft = 10;

What do I do?

3 Answers

In JS, u use the keyword var to create variables.

var shipsLeft = 10;

</TREagans>

It didn't work. Fill in the blank below. Bummer! Unfortunately, that answer is incorrect. Skip Quiz Review Video Next Question Finish the code below to create a variable named shipsLeft containing the number 10.

var shipsLeft = 10;

Sometimes the answer is so on our face that we ca not belive. Thanks Thas Eagans To create a create a variable we must put var like they said in the class.

Fill in the blank below. Bummer! Unfortunately, that answer is incorrect. Skip Quiz Review Video Next Question Finish the code below to create a variable named shipsLeft containing the number 10.

var shipsLeft = 10;

i wrote the same thing and it worked

Hmmm, that's weird.

</TREagans>