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 Hello, JavaScript! Write JavaScript Statements

Holidson Lucien
Holidson Lucien
3,632 Points

i can't seem to answer that question right. i loaded the javascript file to the html(inside the head element)

index.html
<!DOCTYPE HTML>
<html>
  <head>
    <meta charset="utf-8">
    <title>JavaScript Basics</title>
   <script src="app.js."></script>
  </head>
  <body>       
    <script>
       alert("Begin Program");
    </script>   

  </body>
</html>
app.js
 alert("Begin Program");

2 Answers

Mark Sebeck
MOD
Mark Sebeck
Treehouse Moderator 38,297 Points

hi Holidson. Couple of things. You want to load the javascript file inside the body since that is what they tell you to do.. Also you should not have a period after "app.js". The "Begin Program" will go inside the javascript file in part 2 so delete that from the body. Hint you will need to use console.log instead of alert in part 2. hope this helps and keep at it Holidson!

Holidson Lucien
Holidson Lucien
3,632 Points

It works Thank you very much Mark. i really appreciate it!!!