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

how do I create a Javascript file on a Mac to run it later. Please help!

I'm trying to save my program in my computer, i have a new mac and i can't figure out out to do it.

3 Answers

Adama Sy
Adama Sy
7,076 Points

open sublime text or anything that you are using to create your htmls or css code, insted or .html, or that css, do it with .js when you save it, that is all you need to do brother

Eric Vandenberg
Eric Vandenberg
9,095 Points

You can save it as anything.js for example myscript.js or whateveryouwant.js

You can save that file anywhere locally but you probably want to keep it in a folder that is most easily accessible for you and your text editor workflow. For example with Sublime text you want to save in the users folder.

What text editor are you using?

Thanks for the reply, i'm using text edit.

it worked, thanks for your time!