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 Working with Strings Transform and Manipulate Strings

When I look in the console on the webpage it pulls up everything I console log is undefined. What am I doing wrong?

Nothing shows up in the console when I use this code:

const passphrase = 'Open Sesame'; console.log(passphrase.toLowerCase());

First, check if you have connected the HTML to the Javascript, then the typos. Those the first things I look at when I face errors.

2 Answers

Hi :)

  1. Go to your index.html file and check if your script src is right. Make sure it is located in your JavaScript file transform.js in your js folder.

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

  1. Did you save your file? If not save your file and run the program again.
Steven Parker
Steven Parker
230,970 Points

For me the console displays "open sesame".

But if you're typing this directly into the console, the console typically shows you the value returned from any statement you enter. Neither an initialization or a console.log function return anything, so it would also display "undefined".