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 trial

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.

script.js
var temperature = 37.5;
alert(Math.round(temperature));
aletr(Math.floor(temperature));
index.html
<!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>

2 Answers

andren
andren
28,558 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.