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 trialtae shik hwang
11,827 PointsWhy my code is wrong? I don't understand.
Could you help to check?
<!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> alert("Warning"); </script>
</script>
</body>
</html>
1 Answer
Ioannis Leontiadis
9,828 PointsHello,
you have nested <script>
tags.
Your code should look like this,
...
<script src="scripts.js"></script>
<script> alert("Warning"); </script>
...
The problem also might be in scripts.js file so if this does not fix the issue feel free to expose it !
tae shik hwang
11,827 Pointstae shik hwang
11,827 PointsThanks, but i did it as you wrote above, it didn't work. I don't understand why this is still failed.
The comment is as below. ("Oops! It looks like Task 1 is no longer passing.")
Ioannis Leontiadis
9,828 PointsIoannis Leontiadis
9,828 PointsYou just need to remove
<script src="scripts.js></script>
as you do not need to import a script from some file named scripts.js ! Hope that fixes it : )