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

Herman Vicens
Herman Vicens
12,540 Points

<script scr=

what is wrong with this? <script scr="Shout.js" ></script>

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

3 Answers

Julian Gutierrez
Julian Gutierrez
19,201 Points

Simple typo, it should be src not scr.

andren
andren
28,558 Points

There are two issues:

  1. You have a typo, scr should be src.

  2. Filenames are (on many systems) case-sensitive. So Shout.js and shout.js are not the same file.

If you fix the typo and fix the capitalization on the filename like this:

<!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>

Then your code will pass.

Stephan Olsen
Stephan Olsen
6,650 Points

It's src and not scr.

// Wrong
<script scr="Shout.js"></script>

// Right
<script src="Shout.js"></script>