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

Uncaught ReferenceError: Console is not defined (?!)

I'm trying to use myscript.js within a basic website ("Programming.html") that is in the same directory. In the console, "Uncaught ReferenceError Console is not defined" is the message I get.

Below is the source code for myscript.js, and Programming.html, respectively - please let me know if I need to format either differently to allow others to see it.Thanks!

'''Console.log("Hello from myscript.js");'''

'''<!DOCTYPE HTML>

<html lang="en"> <head> <title>Javascript Practice</title>

<style> html {
background: #FAFAFA;
font-family: sans-serif;
}
</style>
<script src="myscript.js"></script>

</head>

<body> <h1>Introduction to Programming</h1> <h2>Using Javascript</h2>

</body> </html>'''

2 Answers

Javascript is case sensitive. The proper command should look like:

console.log("Hello from myscript.js");

Thanks Miguel!