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 trialDiego Vogel
12,876 Points*[SOLVED]* "Task 1 no longer passing" - is this a bug?
This is a simple exercise where I'm simply modifying an object property and then adding another a property.
Task 1 is to modify a property by targeting it (as opposed to changing it in the object definition): newYork.population = 8.406e6;
Task 2 is to add a property in a similar manner: newYork.country = USA;
However, when I click "Check Work" for task 2 it says "task 1 is no longer passing" even though I haven't changed anything related to task 1. Very frustrating because I can't continue the course (there's no skip option). Is this a bug?
var newYork = {
population: 100,
latitude: '40.7127 N',
longitude: '74.0059 W'
};
newYork.population = 8.406e6;
newYork.country = USA;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Objects</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHi Diego,
Very glad you found your error. I have edited your title to mark as "Solved" for the others in the Community.
I agree, the "Task # is no longer passing"
is confusing and very misleading. In the future, if you get this error, don't worry about the previous task it is referencing. This error always means that you have introduced a Syntax Error
in the current task being worked on. So, resist the temptation to click "Go to Task #" and just review the current code to find the syntax error (like the missing quotes in this case).
I think this error pops up like that because of the way the Code Checker runs. It runs in sequence, and a syntax error in the current task can interfere with the Checker as it goes through the other tasks. Maybe? :)
Keep Coding!
Diego Vogel
12,876 PointsOk thanks for the tip!
Diego Vogel
12,876 PointsDiego Vogel
12,876 PointsNevermind, I just needed quotes around "USA". But still, that error message about task 1 no longer passing is confusing.