JavaScript
{{GlossarySidebar}}
JavaScript (or “JS”) is a programming language used most often for dynamic client-side scripts on webpages, but it is also often used on the {{Glossary("Server","server")}}
-side, using a runtime such as {{Glossary("Node.js")}}
, {{Glossary("Deno")}}
, and Bun.
JavaScript should not be confused with the Java programming language. Although “Java” and “JavaScript” are trademarks (or registered trademarks) of Oracle in the U.S. and other countries, the two programming languages are significantly different in their syntax, semantics, and use cases.
JavaScript is primarily used in the browser, enabling developers to manipulate webpage content through the {{Glossary("DOM")}}
, retrieve content from servers using the {{domxref("Window/fetch", "fetch()")}}
API, store complex data using {{Glossary("IndexedDB")}}
, draw graphics with {{Glossary("canvas")}}
, interact with the device running the browser through various {{Glossary("API","APIs")}}
, and more. JavaScript is one of the world’s most commonly-used languages, owing to the recent growth and performance improvement of {{Glossary("API","APIs")}}
available in browsers.
Origins and History
Conceived as a server-side language by Brendan Eich (then employed by the Netscape Corporation), JavaScript soon came to Netscape Navigator 2.0 in September 1995. JavaScript enjoyed immediate success and {{glossary("Microsoft Internet Explorer", "Internet Explorer 3.0")}}
introduced JavaScript support under the name JScript in August 1996.
In November 1996, Netscape began working with Ecma International to make JavaScript an industry standard. Since then, the standardized JavaScript is called ECMAScript and specified under ECMA-262, whose latest (fourteenth, ES2023) edition is available as of June 2023.
Recently, JavaScript’s popularity has expanded even further through the successful Node.js platform—the most popular cross-platform JavaScript runtime environment outside the browser. Node.js - built using Chrome’s V8 JavaScript Engine - allows developers to use JavaScript as a scripting language to automate things on a computer and build fully functional {{Glossary("HTTP")}}
and {{Glossary("WebSockets")}}
servers.