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

# Help

Why does the answer from my prompt get compared with a number when it's not supposed to, as the video said?

```var randomNumber = Math.floor(Math.random() * 6) + 1;
var guess1 = prompt("Guesser 1    I am guessing a number from 1 through 6. What is my number?");
var guess2 = prompt("Guesser 2    I am guessing the same number from 1 through 6. What is my number?");
if (Math.abs(randomNumber - guess1) < Math.abs(randomNumber - guess2)) {
document.write("Guesser 1 wins! The number was " + randomNumber + ".");
} else if (Math.abs(randomNumber - guess1) > Math.abs(randomNumber - guess2)) {
document.write("Guesser 2 wins! The number was " + randomNumber + ".");
}
else if (Math.abs(randomNumber - guess1) === Math.abs(randomNumber - guess2)) {
document.write("Tie! The number was " + randomNumber + ".");
}
```

```parseInt()
```parseFloat()