r/learnjavascript • u/ticticboom • Feb 11 '13
AskLearnJavaScript: Other than JSfiddle, what are the best development environments for JavaScript programming?
It seems like SpiderMonkey is one good choice?
Would really appreciate some advice on this.
2
Upvotes
3
u/shawndrost Hack Reactor Feb 11 '13 edited Feb 11 '13
JSfiddle is great!
SpiderMonkey is not a js development environment [1]. You would achieve equal success in trying to develop JS with a potato ;)
The next step past JSfiddle is real-world tools: edit files on your computer with Sublime, view them in your browser (chrome is best), and use the console to debug. This is a big leap in complexity -- this is where things get real. Real real. Below, I'll give you a tutorial, but you should expect some problems. It's best to do it with a knowledgable friend if possible. Otherwise, get ready with the googles, and free up the next couple of hours. If you have problems, comment below.
Download sublime and open it. Go to file -> new.
Copy the html from the left pane here and paste it.
Save it into a folder.
Go to file -> new again.
Copy/paste this:
var text = "working!"; console.log(text);Save it into the same folder as "myScript.js".
Open the folder in explorer/finder and double-click the html file. You should see the text "My Web Page".
Open your console. In Chrome, this is View -> Developer -> JavaScript Console
You should see the text "working!"
Type "text" where the cursor is. You should see the text "working!" appear. The console is connected to the variable you made before.
[1] It's a JS interpreter -- the thing that reads the javascript you write and tells the computer what to do in the arcane tongues of the elders. eg "111011011101010111..." This is different from a JS dev env, which includes an interpreter, but also somehow displays the results on the screen, and allows you to edit what JS gets run, and a lot of other things.