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) Storing and Tracking Information with Variables Working with Strings and Finding Help

Katie Shook
Katie Shook
12,234 Points

The console says : "Can you get JavaScript to work" No matter what I type in the workspace. How do I fix this?

How can i fix this so I can continue working? I've refreshed, reloaded the page and opened a new workspace but it still does the same thing.

Can you post a snapshot of your workspace?

Katie Shook
Katie Shook
12,234 Points

I'm having trouble posting an actual picture but here is the code I have.

var passphrase = " Open Sesame"; console.log (passphrase.length); passphrase.toLowerCase());

and the html

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/main.css"> <title>"Can you get JavaScript to work?"</title> </head> <body> <div class="container"> <h1>Can you get JavaScript to work?</h1> <script src="scripts.js"></script> </div> </body> </html>

2 Answers

Steven Parker
Steven Parker
229,644 Points

This code is designed to display "Can you get JavaScript to work?" on the web page, not in the console. Perhaps you are looking at the web page?

The JavaScript console should display the number 12. Have you opened the console in the browser?

And a "snapshot" is a URL that points to a copy of the entire workspace. Here is a video about making a snapshot.

Katie Shook
Katie Shook
12,234 Points

Ops! I I guess I mean the webpage. Thanks for the info.

https://w.trhou.se/eu4iqgfk7y

Steven Parker
Steven Parker
229,644 Points

It looks like you made a few changes. As the code is now, I see these issues:

  • you wrote "Alert" (with capital "A") instead of "alert"
  • there's an extra closing parenthesis on the last line
  • the last line doesn't do anything (did you mean to call "console.log" again?)
Katie Shook
Katie Shook
12,234 Points

I was tinkering around trying to get anything to change. Iā€™m not sure what happened but it is working now. Thanks for the help!