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 trialnoel tanyanyiwa
6,877 PointsThere are two files: a web page, index.html, and a JavaScript file, shout.js. To run any programming in the shout.js fil
task 1 of 2
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script>src=("shout.js".alert"hello noel");</script>
</body>
</html>
1 Answer
Andrew Hinkson
Full Stack JavaScript Techdegree Graduate 25,822 PointsCheck your opening script tag. The src is an attribute of the script tag itself.
So when your trying to link an external javascript file the skeleton of the link would look like this:
<script #your attributes src, type, etc#></script> or <script src=""></script>
Goce Petrov
8,302 PointsCan you please just try the way that I told you :)
Because i just try linking the script tag as i write you and that's the right way :)
Goce Petrov
8,302 PointsGoce Petrov
8,302 Pointsyou just need to link shout.js <script src="shout.js"></script> and then write alert('I did it '); in the file that you have shout.js not in the same line with the script tags :)