Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm reading books on JavaScript programming, and I need an environment like Python's IDLE to type JavaScript commands into and then see the results like you would in IDLE.

Is there an environment where you can do such a thing?

share|improve this question

closed as off-topic by Thomas Owens Jul 18 at 13:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Thomas Owens
If this question can be reworded to fit the rules in the help center, please edit the question.

6 Answers 6

Any of the major browsers (IE, FireFox, Chrome, Safari, etc..) will execute and display the results of JavaScript code that you put into it.

You can open the developer console in Chrome and in IE using F12 and in Firefox using Ctrl+Shift+K. Alternatively you can simply put it into a .html file.

share|improve this answer
4  
This answer really needs to say more about how to put the Javascript into your browser; in particular, it ought to mention the Javascript console. –  user2357112 Jul 18 at 9:01

I find http://jsfiddle.net/ to be a good test environment for trying things out (in JavaScript, HTML and CSS), if you just want to try something easily and now using your browser.

share|improve this answer
    
I second jsfiddle, especially because it's really plug&play. You don't need to worry about connecting your HTML and CSS to your javascript properly, and it reacts almost instantly. You just write your code, write your HTML, press a button and you see the result instantly. And because it's a website, you can link other people to your code extremely easily for debugging and demonstration purposes. –  Nate Kerkhofs Jul 18 at 9:24

Mainstream browsers’ dev tools have a console for executing expressions:

See also Plunker. It is similar to the already mentioned jsFiddle.

share|improve this answer
    
@MattThrower See first comment of the first answer. That answer was edited since then. My answer points to exactly what is needed and there is not much point copy-pasting the information that is already perfectly worded. Please apply a bit of common sense next time instead of following the guidelines blindly. –  Den Jul 18 at 13:04
    
Reminders to use common sense are always appreciated. But in this case, I already did. Mileage varies. –  Matt Thrower Jul 18 at 13:20

Most of the answers centre on JavaScript code in the web browser. If you're interested in server-side JavaScript code (or more generally, JavaScript code in non-browser environments), then you've got a couple of other options:

  • Node.js is currently the most popular server-side JavaScript framework and comes with an interactive console. Once you've installed Node.js, you can start the console either from the Start Menu, or by typing node into a terminal.
  • There's also a reasonable amount of buzz about Nashorn, which is bundled with Java 8. Once you've installed JDK 8, you can start the console by running jjs, which depending on your OS will either be available automatically from the terminal, or found at $JAVA_HOME/bin/jjs.
share|improve this answer

As for actual IDE's, you could use Visual Studio (express version is free). They've added better JS intellisense support in the past few releases.

share|improve this answer

Jetbrains Webstorm is an IDE you can use as well, if that's the sort of thing you're looking into.

Otherwise, there's probably an eclipse plugin.

There's also Sublime Text and Atom, that, with a few plugins, can do it very well.

share|improve this answer

protected by Community Jul 18 at 13:24

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.