What is "javascript"

Javascript is an object-oriented language based on prototypes, with dynamic typing, weakly typed. It is commonly used for scripting in web browsers, and can also be used in desktop applications or server-side. Despite the name, it is not related to java programming language and bears only superficial similarities.

It runs on almost all operating systems and an engine (engine) Javascript is included in almost all browsers mainstream. Developed in 1995 by Brendan Eich, in Netscape Communications, was originally called Livescript, but was soon renamed to Javascript due to Netscape’s friendship relationship with Sun Microsystems at the time.

The specification that describes how Javascript works is Ecmascript (standard ECMA-262). It is currently in its 11th edition, published in June 2020.

Engines or standalone Javascript interpreters are available, such as:

  • Mozilla Spidermonkey(in English) was the first engine Javascript, currently used in Mozilla Firefox.

  • V8(in English), engine Google Javascript, is used in Google Chrome, (a platform that allows server-side applications to be written in Javascript) and other projects.

  • Windows includes a Javascript variant in its Windows Script Host, the .

  • The Mozilla Foundation also offers Rhino, an implementation of Javascript built in .

  • Webkit (except for the Chromium project) implements the engine Javascriptcore(in English) .

  • Nashorn (Oracle and Openjdk) - implementation of the Java Specification Request (JSR) 223, which allows the execution of Javascript from within Java applications by merging the JS syntax with the Java API.

The Mozilla Developer Network (MDN) contains good documentation about Javascript.

Javascript is usually used to manipulate the Document Object Model (DOM) and Cascading Style Sheets (CSS) within the browser, offering scripting for user interface, animation, automation, customer side validation and more.

However, with the recent emergence of runtimes, as Node.js, Javascript can now be used to write applications server-side.

Nomenclature

Often people use the term Javascript informally. The language and the term originated in Netscape. Ecmascript, Javascript and Jscript are easy to confuse terms.

Ecmascript was developed as a standardization of Netscape Javascript and Microsoft [Jscript]. The canonical reference is ECMA-262 - Ecmascript Language Specification. While Javascript and Jscript seek to be compatible with Ecmascript, they also provide additional features (and other variations(in English)) not described in ECMA specifications. Other implementations of Ecmascript also exist.

The differences for those using Javascript are negligible, people usually do not distinguish the variations of Javascript and Jscript for Ecmascript.


When asking a Javascript question, it is ideal:

 1. Isolate the problematic code and reproduce it to an online environment such as jsFiddle, JS Bin or using the tool to run code in the post, but remember to include the code in your original post.

 2. If a library or framework is used, mark the question with the appropriate tags: for jQuery, for Prototype, for Mootools, for Node.js, and so on. However, if a framework is not used or needed, do not include these tags.

 3. Mention which browser the code is in trouble, and which error messages, if any, have been displayed by the browser. If the question is browser specific, use tags from , , , , etc..

 4. Mark the question with or only if you are asking about a subject that concerns the combination of one of these with Javascript and can only be answered with specific information about any of these subjects.


Learning Resources

Where to learn more about Javascript.

Books

Online