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

Task 2 of 2. Inside the shout.js file create an alert dialog with the message " I DID IT"

Need help again guys.

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

4 Answers

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

Tony Bourne I feel like sending you the code is a bit overkill here as you completed Task 1 with no problem I also feel like you understand the code, but that it's misplaced. As Jonathan Grieve pointed out, there are multiple files inside this challenge. If you're used to using workspaces then you're used to seeing the files listed on the left. But in the challenges the files are listed at the top as tabs.

Take a look at:

this screenshot.

Your alert() should go in the tab I have circled.

Hope this helps! :sparkles:

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

It looks like you ran into some bother attempting to link the script in the HTML. You need to provide a self closing script tag that uses shout.js in its source attribute.

You're almost there. Cut out the alert method from the script tag in your HTML, and look for the shout.js file in your code challenge editor.

Sometimes, code challenges have more than one tab of files to work with. So you simply use the alert() method in the shout.js file.

Can u send me the code please.

ok i see. Thank you.