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

Jamie Brennan
Jamie Brennan
1,207 Points

I can either get task One or task Two to work but not both together. I typed alert("Warning!"); yet it says I didn't

Bet I'm making a silly mistake in my code, but I can't get both to run together in Task Two. If I get Warning! to work, it says Task One can't run. When I get it to run, it says I didn't call the alert function. :( ?

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
  <script src="scripts.js"></script>

3 Answers

anthony crowell
anthony crowell
Courses Plus Student 10,953 Points

Hi, I think the challenge is only asking for one set of script tags in the body, it appears to me that you have two.

Exactly. Jamie, when it comes to challenges, only do what the challenge asks you to do. You shouldn't add in any extra unnecessary code to the challenge such as the line:

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

Delete that line from the challenge as it does not belong.

Jamie Brennan
Jamie Brennan
1,207 Points

Thank you Anthony and Marcus, it works now. :)

You're welcome, Jamie!