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

im stuck

Please fill in the correct answer in each blank provided below.

Fill in the blank(s) below:
Complete the code below to declare a counter variable and create a while loop:

counter = 0; ( counter < 10 ) { console.log(counter); counter += 10; }

3 Answers

rydavim
rydavim
18,814 Points

I'm going to guess that you're referring to this quiz.

_ counter = 0;
_ (counter < 10) {
  console.log(counter);
  counter += 10;
}

So in the first line you're trying to declare a variable. Example: let foo = "bar"; What keyword is missing from the quiz declaration?

In the second line you're trying to create a while loop. What keyword might you need to add for a while loop?

If you still feel stuck with those hints or if you have questions, let me know and we can walk through the solution. Good luck, and happy coding!

thank you

let, while