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

javascript consol code

"Next, in the app.js file, add the code required to print the "Begin program" to the browser's JavaScript console" ??

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

Did you try clicking 'Get Hints' in the challenge as suggested?

Yes. The Hints were

  1. Use console.log to print messages to the browser's JavaScript console.

  2. console.log("This message will print to the console!");

But i'm not sure if i need to add consol.log to the app.js file alone .... Thats why i'm so confused because i dont know where i should be putting the command

This is the error message i am getting after submitting consol.log("Begin program"); to the app.js file

"There was an error with your code: ReferenceError: Can't find variable: consol"

1 Answer

You are close. That is all you need in app.js for task 2. However there is an e at the end of console.

console.log("Begin program"); 

oh wow!! I'm an idiot haha. Thank you so much!