JavaScript JavaScript Basics Hello, JavaScript! Write JavaScript Statements

Alana Warson
Alana Warson
5,296 Points

I use the script src into the index.html page becase it says to in directions. I am so confused with this assignment.

Does anyone know how to do Challenge Task 1?

index.html
<!DOCTYPE HTML>
<html>
  <head>
    <meta charset="utf-8">
    <title>JavaScript Basics</title>
  </head>
  <body>
    <main>
      <h1>Hello Javascript!</h1>
    </main>
    <script src="myJSfile.js></script>
  </body>
</html>
app.js

Alana Warson
Alana Warson
5,296 Points

Does this script go into the app.js file then? When I was attempting this challenge, I thought it said to "upload first into the html file. What happens if I do not get it correct after several attempts ... just keep moving on?

Yes, it does go in an HTML file. That's how we load javascript into the browser. I would suggest to keep moving on, almost every course that consists of javascript will go through this process. So you will get used to it.

Alana Warson
Alana Warson
5,296 Points

Thank you for your help.

1 Answer

As mentioned in the challenge, the name of the file should be app.js

<script src="app.js"></script>