Skip to main content
Glossary Term

JavaScript

History and Development of JavaScript - Mosaic, the first popular web browser with a graphical user interface, was released in 1993. - The Netscape corporation was founded by the lead developers of Mosaic, and they released Netscape Navigator in 1994. - Web pages in the early years were static and lacked dynamic behavior. - Netscape decided to add a scripting language to Navigator in 1995, leading to the creation of JavaScript. - The name 'JavaScript' was chosen as a marketing ploy during the dot-com boom. - Netscape collaborated with Sun Microsystems to embed the Java programming language, but also hired Brendan Eich to embed the Scheme language. - Netscape management decided that Eich should create a new language with syntax similar to Java. - The language and its interpreter were initially called LiveScript but were renamed JavaScript for the official release. - The choice of the JavaScript name caused confusion, as it implied a direct relation to Java. - JavaScript was officially released in December 1995. - Microsoft created its own JavaScript interpreter called JScript by reverse-engineering the Navigator interpreter. - JavaScript was released in 1996 alongside initial support for CSS and extensions to HTML. - Differences between the JavaScript implementations in Navigator and Internet Explorer led to compatibility issues for developers. - Best viewed in Netscape and best viewed in Internet Explorer logos were commonly used during this time. - Microsoft's dominance in the browser market made JScript the de facto standard for client-side scripting. - Netscape submitted JavaScript to Ecma International in 1996, leading to the release of the first ECMAScript language specification in 1997. - ECMAScript 2 was released in 1998, followed by ECMAScript 3 in 1999. - Microsoft's Internet Explorer reached a market share of 95%, solidifying JScript's position as the dominant client-side scripting language. - Microsoft stopped collaborating on Ecma work, leading to the mothballing of ECMAScript 4. - Firefox's release in 2004 started to change the stagnant client-side scripting landscape. - Mozilla joined ECMA International in 2005, and work began on the ECMAScript for XML (E4X) standard. - Collaboration between Mozilla and Macromedia aimed to standardize ActionScript 3 as the new ECMAScript 4, but without cooperation from Microsoft, it didn't materialize. - Open-source communities spearheaded a renaissance period for JavaScript, resulting in the creation of libraries like jQuery, Prototype, Dojo Toolkit, and MooTools. - Google's Chrome browser, released in 2008, introduced the V8 JavaScript engine with just-in-time compilation (JIT). - The ECMAScript 5 standard was released in 2009, combining the efforts of various parties. Usage and Applications of JavaScript - JavaScript is the dominant client-side scripting language of the Web. - 98% of all websites (mid–2022) use JavaScript for client-side scripting. - Scripts are embedded in or included from HTML documents. - JavaScript interacts with the DOM. - All major web browsers have a built-in JavaScript engine. - Loading new web page content without reloading the page, via Ajax or a WebSocket. - Web page animations, such as fading objects in and out, resizing, and moving them. - Playing browser games. - Controlling the playback of streaming media. - Generating pop-up ads or alert boxes. - Over 80% of websites use a third-party JavaScript library or web framework. - jQuery is the most popular client-side library, used by over 75% of websites. - React is a free and open-source front-end JavaScript library for building user interfaces based on components. - Angular is a TypeScript-based, free and open-source single-page web application framework. - Vanilla JS refers to websites not using any libraries or frameworks. - JavaScript is used in server-side website deployments and non-browser applications. - Initial attempts at promoting server-side JavaScript usage were Netscape Enterprise Server and Microsoft's Internet Information Services. - Server-side usage started to grow in the late 2000s with the creation of Node.js. - Electron, Cordova, React Native, and other frameworks have been used to create applications with JavaScript. - JavaScript is used in Adobe Acrobat for scripting PDF documents and GNOME Shell extensions. JavaScript Engines and Runtimes - JavaScript engines execute JavaScript code. - The first JavaScript engines were interpreters, but modern engines use just-in-time compilation. - JavaScript engines are typically developed by web browser vendors. - V8 engine is a core component of the Node.js and Deno runtime systems. - ECMAScript engine is another name for JavaScript engines. - JavaScript relies on a run-time environment to provide objects and methods for scripts to interact with. - JavaScript environments are single-threaded. - JavaScript processes messages from a queue using the event loop. - Node.js is a cross-platform JavaScript runtime environment. - Deno is a runtime for JavaScript, TypeScript, and WebAssembly. Language Features and Concepts - JavaScript supports structured programming syntax from C. - JavaScript is weakly typed, with implicit type casting. - JavaScript has automatic semicolon insertion. - JavaScript has received criticism for its conversion rules. - JavaScript has built-in functions for string and number casting. - JavaScript is dynamically typed. - A type is associated with a value rather than an expression. - Variables can be reassigned to different types. - JavaScript supports various ways to test the type of objects. - Duck typing is supported. - Prototypal inheritance is used in JavaScript. - Objects are mutable and can be augmented with new fields and methods. - Objects can act as prototypes for creating new instances. - Two syntactical ways to specify object property names: dot notation and bracket notation. - Properties of an object can be enumerated using a for...in loop. - JavaScript uses prototypes for inheritance. - Many class-based features can be simulated with prototypes. - Functions can be used as object constructors. - The Object.create method allows explicit creation of instances without automatic inheritance. - The constructor's prototype property determines the new object