## 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!

### 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.  PLUS

# I keep getting a score of '0'. how do I fix my scoring section/what did I not do to my code?

```/* QUIZ
Experimenting with if/else statements in a quiz format with a score */

//questions 1-5 prompt with an alert and score
var question1 = prompt("What color is the sky?");
question1 = question1.toUpperCase();

if (question1 === 'BLUE') {
score += 10;
} else {
}

var question2 = prompt("How many legs does a horse have?");
question2 = question2.toUpperCase();

if (question2 === '4') {
score += 10;
} else {
}

var question3 = prompt("What is a 'two-legged' ?");
question3 = question3.toUpperCase();

if (question3 === 'HUMAN') {
score += 10;
} else {
}

var question4 = prompt("Name the best food at McDonald's.");
question4 = question4.toUpperCase();

if (question4 === 'FRENCH FRIES') {
score += 10;
} else {
}

var question5 = prompt("Can you ride a giraffe?");
question5 = question5.toUpperCase();

if (question5 === "YES") {
score += 10;
} else {
}

//score keeping
var score = 0;
if (score === 50) {
} else if (score <= 40) {
} else if (score <= 30) {
} else if (score <= 20) {
} else {
}
``` ## Your program sets the score to 0 after all the questions have been asked.

On line 56 you have "`var score = 0`". You probably want to move this to the very top.

Also, when testing the various score levels you do a "less than or equal" (`<=`) comparison. You probably want "greather than or equal" (`>=`).

And you could save a few lines by doing the "your score is.." alert before you check the score range.

Finally, shouldn't the correct answer message be "WOOT! WOOT!"? Just one woot seems a bit under-enthusiastic. Happy coding! 