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 trial

JavaScript JavaScript Basics (Retired) Introducing JavaScript Link to an External Script

js file

What does YOU did not call the alert() in js file mean

index.html
<!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"></script>
  alert("I DID IT")
</body>
</html>
shout.js

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! When you open the challenge, you will see two tabs. One has the index.html file and one has the shout.js file. In your HTML, you link your html to shout.js. And that part, you did just fine. But then you're supposed to put the alert statement in the shout.js file. You have, however, put it in your HTML file.

Take another look at the question you posted. At the bottom you'll see a black empty box with the title shout.js. It's the one that's supposed to contain the alert.

Hope this helps! :sparkles:

Also, don't forget the exclamation point on the end! :smiley:

Zack Lee
PLUS
Zack Lee
Courses Plus Student 17,662 Points

Its asking you to load the script in the html and call the alert in the js file.

index.html

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <script src="shout.js"/>
  <title>JavaScript Basics</title>
</head>
<body>
</body>
</html>

shout.js

alert("I DID IT");

Thanks