For the first time, I began learning Javascript, however on the start I stuck up with two possible options: Rhino and Spidermonkey. Could you please, tell me what is one, and what is another, so I can easily choose for myself the best option that suits my needs. If it makes easier for you, you can list advantages and disadvantages of both Javascript versions.
Asked
Active
Viewed 7,780 times
12
-
Are you trying to embed a JavaScript engine in your application...or are you just trying to learn JavaScript? – Justin Niessner Jan 17 '12 at 16:59
-
Both are JavaScript engines, not framework or JavaScript versions. But both support different version of JavaScript – Andreas Köberle Jan 17 '12 at 17:01
-
I would like to embed a javascript engine in one of my applications. – Dzek Trek Jan 17 '12 at 17:01
-
@AndreasKöberle, I know I just wanted to have more tags, so that more people can see this, after all engine is some kind of initial framework right. Also, I didn't know for rhino and spidermonkey tags. ;) Thanks on your editing. – Dzek Trek Jan 17 '12 at 17:05
2 Answers
19
It depends on what you're trying to do with JavaScript. If your intent is just to learn the language then I recommend using a web browser such as Chrome or Firefox and using their built-in (or addon) JavaScript consoles.
As to your specific question about standalone JavaScript interpreters, here are some notes:
- Rhino - implemented in Java, intended primarily for use as a scripting engine extension for the Java platform. Includes an interactive command-line console, which will be helpful for learning.
- SpiderMonkey - implemented in C/C++, intended for use as the JavaScript engine in Firefox.
See also:
- V8 - implemented in C++, designed primarily as the Chrome browser's JavaScript implementation; well suited for embedding.
- node.js - a standalone, evented, asynchronous JavaScript environment, based on V8.
- Narwhal - a CommonJS platform.
- Windows Script Host - includes a JScript interpreter (ECMAScript based, very similar to modern JavaScript).

maerics
- 151,642
- 46
- 269
- 291
-
Thank you for providing me with the links in which I can find documentation which will tell me more about the engines, and for the links of various JavaScript implementations. – Dzek Trek Jan 17 '12 at 17:21
-
1i would add that for learning javascript the best two options are: a browser or node.js as both don't involve a build proccess _per se_, **but** if your learning _is_ about how to embbed js engines and use then as extensions to your learning language (like c++, java or c#) i then advice you that there be dragons, but building and thinkering with the one that suit's you is the way to go. – madcampos Dec 11 '13 at 06:36
3
Rhino is written in Java. SpiderMonkey is written in C/C++. I wouldn't go near either for the purposes of "learning JavaScript", for which a browser is probably more suitable.

Quentin
- 914,110
- 126
- 1,211
- 1,335