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 Introduction to Programming Basics Writing Your Program

Any idea why this isn't working on windows 8.1? I know how to write HTML and CSS and but java isnt working for me

So I know how to write HTML and CSS and a little bit of Java but with Eclipse, When I try to write the consol.log commands with text edit and have it saved as a .js file it doesn't work like it is shown in this video. Instead I get an Error message I've tried adding a space with consol.log ("hello World"); and it doesn't work.. Does this not work on windows? should I be using something else? I'm getting pretty frustrated that everyone seems to be using macs but I cannot afford a mac so I'm doing it with windows 8.1 and I feel like I'm doing something wrong or I'm not using the right tools which he doesn't really explain what to use...

This is what I have in the HTML and Java

            <p><!DOCTYPE html>
<html lang="en">
 <Head>
  <title> Introduction to programming</title>
<script src="myscript.js";></script>
</head>
<body>
<h1>Introduction to programming</h1>
<h2>with Javasctipt</h2>
</body>
</html>

consol.log("hello from myscript.js");

consol.log("Hello again!");



</p>
            ```

1 Answer

You got a few errors. Here are fixed versions with a few comments

HTML document: 
<!--- Notice how theres no wrapping <p> tag around the HTML document -->
<!DOCTYPE html>
<html lang="en">
 <Head>
  <title> Introduction to programming</title>
<!-- you don't need the comma after the file name -->
<script src="myscript.js"></script>
</head>
<body>
<h1>Introduction to programming</h1>
<h2>with Javasctipt</h2>
</body>
</html>


JS Document (myscript.js)
//notice how you spelled console.log as consol.log, you forgot the e

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

console.log("Hello again!");

Oh my gosh! wow Thank you! I feel like a complete idiot now! Its been pretty frustrating for me lately because of the known issues with Eclipse and me feeling like I'm not able to move on even though I've followed all of the steps provided and still not fixed, so hopefully something comes up. if you want to take a look the link is (https://teamtreehouse.com/forum/same-code-different-models-different-screens)