Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!