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 trialKim Dallas
11,461 Pointsalert within filename?
the alert warning is called within the file name
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
<body>
<script src="shout.js"
<script> alert ("I DID IT!"); </script>.
</html
4 Answers
KRIS NIKOLAISEN
54,972 PointsTask 2 asks: Inside the shout.js file, write the code for an alert. You don't need to modify what you did in task 1.
Otec Perez Glass
7,678 PointsKim Dallas Hi there! I hope youβre doing well. when you are calling the SRC attribute and you assigned a path in your case you do not have to write code inside the <script > tag all of your JavaScript code should be place on the shout.js file like this.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script src="shout.js"> </script>
</div>
</body>
</html> // Also remember to close the </html>
and then the Js file or shout.js file
alert ("You Did It!");
Kim Dallas
11,461 Pointsthank you Otec
Kim Dallas
11,461 Pointsits not working
Kim Dallas
11,461 PointsKim Dallas
11,461 PointsI did Kris. that's why I don't understand why it won't work. it's saying it has to have opening and closing script tags. I tried that too and it's not working