Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Inside the shout.js file

Parse error

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
<script>
alert("I DID IT!");
</script>

3 Answers

Hi, Erik.

Once you've linked your js file, and you are inside the file, you no longer need to use the <script> tags. Enter the alert without the script tags, and you are good to go.

Ah I see, cheers mate! Still very green to JS

Hey, no worries. I'm new to JS myself. Started about a month ago. It can be daunting at first, but it all starts to come together pretty quickly. Good luck!

That sounds encouraging then. Today is my first day and Treehouse makes it pretty easy to learn. Do you also know html and css? I am learning js for a new job and I'm TOTALLY new to programming. Exciting challenge though.

That's awesome. Welcome to treehouse. I'm new to programming, as well. This is my third month on here. My only previous coding experience was one month on codeacademy. I did start with html and css. I've completed most of the css related courses in my track, so I'm focusing on JS on here, while doing personal css practice projects on the side. You'll like it here, the courses make it easy to learn, and the forum is a great resource. Wish I had signed up a long time ago