Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics (Retired) Working With Numbers Using Math Methods

Charlotte Zhang
Charlotte Zhang
4,425 Points

I did everything right, but it keeps telling me Oops, it looks like Task 1 is no longer passing

my code (for the second test is as follow) var temperature = 37.5 alert(Math.round(temperature)); alert(Math.floor(temperature)); I don't see the mistake, and it keeps telling me that it looks like Task 1 is no longer passing. BTW i encountered this issue before, reckon it is not something I did.

var temperature = 37.5;
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
<script src="script.js"></script>

2 Answers

28,521 Points

The issue in this case is that you have a typo in your third line. You have spelled alert as aletr. If you fix that typo then your code should pass.

The error message about task 1 failing usually happens either when you have changed some code from task 1, or when your code contains a syntax error or something similar that causes the code checker to fail at verifying your code. The issue this time was the latter.

Charlotte Zhang
Charlotte Zhang
4,425 Points

Thanks for the help guys, Andren is right, I made a typo, but that is not the major issues. I made multiple attempts to fix this issues, the copied code is the final one, in which I made a typo. But the real issue is that for some reason, when I finished the second test, my first code just failed to run, If you have the same problem, try clear the history, including the cookies, that's what worked for me.