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

I don't know why am I wrong? The requirement is: Inside the shout.js file, write the code for an alert dialog ...

Help me, please! Thanks so much.

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

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hi Ngat,

All your code is correct, except you have a small typo in the string. You have DIT instead of DID. Challenges are very picky and very specific in what they check for. Just fix the typo and you're good to go! :)

Keep Coding! :dizzy:

Thanks for your help! I am really clumsy

Bolaji Salau
Bolaji Salau
7,980 Points

What is the challenge you are having? you need to state this. If you were trying to link an external shout.js file to your .html file then you must make sure to add the full path in the src="js/shout.js" attribute of the .html file.

From what you have shown, you have added shout.js file as if in the same folder with your .html file. You need to confirm this

Thanks for your help. The correct answer is: alert("I DIT IT!");