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 trialHeidi Laursen
3,524 PointsTask 1 passed and now that I've added task 2's code it's not passing. How do I add code without error? [RESOLVED]
I'm pretty sure the code is correct. But it isn't working I'll test it in the console.
var temperature = 37.5;
var temperatureRound = Math.round(temperature);
alert(temperatureRound);
console.log(temerature);
var temperatureFloor = Math.roundFloor(temperature);
alert(temperatureFloor);
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
Sean Henderson
15,413 PointsDid fixing the Mat.roundFloor
bit fix it for you Heidi?
rydavim
18,814 PointsI've added a 'resolved' tag to your post. Please let me know if your change did not resolve your issue.
Heidi Laursen
3,524 PointsHeidi Laursen
3,524 PointsMat.roundFloor isn't a function. It's Math.floor(). oops