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!

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 Foundations Variables Naming

Uploading Javascript files

How do you upload the project files (especially the Javascript files) to Chrome like you are doing in the videos?

2 Answers

Mark Phillips
Mark Phillips
13,124 Points

Hi Bill,

You can just download the project files for each lesson (usually index.html & myscript.js) and drag them to your browser icon to open them in the browser easily.

You can also go over to a site like CodePen and use that to re-create the contents of the files there for immediate results.

As a third option, in Google Chrome if you go to View => Developer => Developer Tools (cmd + option + i on Mac) and click on the Console tab you can enter in javascript into that window and it will run.

Florian Goussin
Florian Goussin
8,925 Points

Normally and most of the time you just need to include your javascript file in your html just before the closing </body> tag.

<script src="relative_path_where_your_javascript_file_is_located"></script>

Then you just have to open your html file in the browser.

Alleene Lacaba
Alleene Lacaba
Courses Plus Student 5,248 Points

i keep getting syntax error like this: Uncaught SyntaxError: Unexpected identifier loading.html:8 Uncaught ReferenceError: Maze is not defined