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 trialryan johnson
259 Pointswhat am I doing wrong?
i changed nothing from the first task but its wrong and I don't know why?
<!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>
Andrew Hickman
Full Stack JavaScript Techdegree Student 10,013 PointsGant, there is a link at the top of the post that goes directly to the challenge.
3 Answers
Steven Parker
231,268 PointsI'm not sure what you had for task 1, but right now you have two sets of script tags, and one of them is trying to load in an external file.
This challenge only asks you to add one set of tags to put code between. Remove the ones that load in the external file ("scripts.js") and you should pass.
ryan johnson
259 Pointsoooo I got it thanks
Andrew Hickman
Full Stack JavaScript Techdegree Student 10,013 PointsJust remove your first <script> tag. Not sure why you included that.
<body>
<script>
alert("'warning!'"); </script>
</body>
ryan johnson
259 Pointsyour 2nd comment was right thanks man.
Andrew Hickman
Full Stack JavaScript Techdegree Student 10,013 PointsPerhaps the challenge is confused about the double, then single quotes? The above worked for me, but try removing the single quotes:
<body>
<script>
alert("warning!"); </script>
</body>
Andrew Hickman
Full Stack JavaScript Techdegree Student 10,013 PointsSteven Parker's answer is clearer than mine.
gant allen
7,089 PointsI'm blind as a bat lol
gant allen
7,089 PointsI don't use the forums too much.
gant allen
7,089 Pointsgant allen
7,089 PointsTo give you a good answer I would have to know what the first task was, and then know what the second task was. To know why the first task is now wrong. In the future try to write just a little bit more descriptive :).