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

challenge task 2 of 2

After opening and closing script tags to body of page I write a function that will open alert dialog with the message 'Warning!'

<script src="scripts.js></script> <script> alert ("Warning!); </script>

I'm told that task 1 is no longer passing

any suggestions

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="scripts.js"></script>
  <script>
    alert("Warning!")
  </script>
</body>
</html>

2 Answers

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

Hi there! You're doing great, but you've gone a bit above and beyond here. These challenges require that you do exactly as they say. It's a great idea to never do anything more than they ask for. The challenge asks for one set of script tags, but you have two. The extraneous script tags link to a file named script.js which likely doesn't exist in this context. The challenge did not ask you to link to an external script file.

Removing that set of script tags causes this to pass both steps of the challenge.

Hope this helps! :sparkles:

Thank you! That helped a bunch.