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 trialJamie Brennan
1,207 PointsI 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. :( ?
<!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>
3 Answers
anthony crowell
Courses Plus Student 10,953 PointsHi, I think the challenge is only asking for one set of script tags in the body, it appears to me that you have two.
Jamie Brennan
1,207 PointsThank you Anthony and Marcus, it works now. :)
Marcus Parsons
15,719 PointsYou're welcome, Jamie!
anthony crowell
Courses Plus Student 10,953 PointsHi, your welcome, glad it helped.
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsExactly. 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.