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

# there is something wrong with my code could u tell me what is it

/*

• When quiz begins, no answers are correct */

/* the questions and the answers */ const earth = prompt ("What planet we are on ?"); const water = prompt ("What is the 70% of your body?"); const degree = prompt ("What is the boiling water degree?"); const blue = prompt ("What color is the ocean?"); const white = prompt ("What is the color of the sun?");

/* we mad correctAnswers to count how many point the player will get */

if (earth.toUpperCase === "EARTH") { correctAnswers +=1; } if (water.toUpperCase === "WATER") { correctAnswers +=1; } if (degree.toUpperCase === "DEGREE") { correctAnswers +=1; } if (blue.toUpperCase === "BLUE") { correctAnswers +=1; } if (white.toUpperCase === "WHITE") { correctAnswers +=1; }

const points5= `<h2>Gold</h2>`; const points43= `<h2>Silver</h2>`; const points21= `<h2>Bronze</h2`; const points0= `<h2>No Crown</h2>`;

// 2. Store the rank of a player

/*

*/ if ( correctAnswers === 5 ){ document.querySelector('Main').innerHTML= points5 ; }else if ( correctAnswers === 4 || +correctAnswers === 3 ){ document.querySelector('Main').innerHTML= points43; }else if( correctAnswers === 2 || +correctAnswers === 1 ){ document.querySelector('Main').innerHTML= points21; }else ( correctAnswers === 0 ){ document.querySelector('Main').innerHTML= points0 ; }