Online Code Editors
These can be great places to host example pieces of code for you to share, but the fact that they don’t tend to include their own consoles, so all logs go to your actual browser window—which invariably breaks the layouts of the site—make me think there must be other options out there. Which there are. But here are a few resources:
- Jsfiddle – https://jsfiddle.net/
- Codepen – http://codepen.io/
- CSSDeck – http://cssdeck.com/labs
In Your Browser
- Firefox – Hit Tools > Web Developer > Console
- Safari – Develop > Show Web Inspector
Right In Your Text Editor
- Install Node.js – go to https://nodejs.org/en/ and download the most up to date version of the Node software. Set it up and get it working, then…
- Go into your terminal and type
- That will give you the directory Node’s been downloaded to, which you’ll need for the next step.
- In Sublime, navigate to Tools > Build System and hit New Build System
- Replace the code with the code from the Wikihow page. (Method 2, bullet # 3. It’s down there, but it’s definitely there.)
- Save the Build System as ‘Node’ and check that it’s shown up in the Tools > Build Systems menu. Make sure it’s checked off, then launch your Js file!
Cmd + B. If you want to hide the console that shows up, just hit
Here’s the sublime documentation if you want to read up more on Build Systems.
Wellity, wellity, wellity, look who’s coming back to update his old posts. It’s me. I knew I’d be back.
- Write your JS as normal and save it as normal.
- Open your terminal, navigate to the directory containing your JS.
- Type Node <filename.js>
- Sit back, relax.
Well, that’s it for me! Go! Be free! Test your code!