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 trialTravis Wellcome
Courses Plus Student 536 PointsDo i write the alert inside the script of script.js. As i am trying to complete task 2 it says task 1 is not valid. Help
here is my line of code -
<script src="script.js" <>/script> <script> alert('Warning!'); </script>
as i am trying to complete task 2 it says oops! it looks like task 1 is no longer passing...why?? Do i have to have the alert inside the src? please help. thank you
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="script.js" ></script>
<script>
alert('Warning!');
</script>
</body>
</html>
1 Answer
Steven Parker
231,275 PointsThe challenge asked you to add one set of script
tags, but you have two. Also, your first set has a "src" property intended to load in an external file, which was not asked for in the challenge.
Did you paste that in from somewhere unrelated to the challenge?