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) Introducing JavaScript Write Another Program

Oops! It looks like Task 1 is no longer passing.

The browser executes the statement, but the task can't be completed. Help.

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
  <script>
    alert("warning!");
  </script>
  <script src="java.js"></script>

</body>
</html>

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Your code is functional, but you've done something the challenge isn't expecting and included more than one set of script tags. You've included this line:

<script src="java.js"></script>

This line is causing the challenge to fail. Try to keep in mind that challenges are very strict and it's always a good idea to try not to do anything the challenge doesn't explicitly ask for. Even if functional, it can cause the challenge to fail. On a side note, in many cases incorrect punctuation, spelling, capitalization, and spacing inside a string can cause a challenge to fail. In this case, that doesn't happen. But technically, according to the specifications of the challenge you should be issuing an alert with "Warning!", not "warning!".

Hope this helps! :sparkles: