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) Introducing JavaScript Using the Console

Thaddeus Lorenz
Thaddeus Lorenz
3,434 Points

Saying task 1 not working, I go back to task 1 hit recheck, says it works, then I get to task 2 and says task 1 not work

Task 1 not working, then working, task 2 not working because of task 1

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
console.log ("Begin Program");
document.write("Welcome to JavaScript Basics");
dialog ("End Program");

1 Answer

Steven Parker
Steven Parker
216,878 Points

Syntax errors will cause previous task(s) to fail the re-check.

For task 2, you added a line calling a function named "dialog". But since this is not a valid function name it causes the entire script to fail the checks, and task 1 is always re-tested first.

Hint: take a look at what you wrote for task 1. Maybe the answer for task 2 is something similar?