Introduction to JavaScript
This tutorial is about JavaScript. The JavaScript is one of the most popular programming language (scripting language) on the web. After HTML and CSS, JavaScript is the third and one of the core technology of standard web technologies. As of 2023, more than 98% of all websites uses JavaScript as their client-side programming language.
JavaScript History
In 1994, Netscape Corporation released the "Netscape Navigator" web browser. In those early days, web pages and websites were static. The company (Netscape) realized that there is a great need to add dynamic components and interactivity to web pages, which is not possible with HTML alone. This led to the decision to develop a new scripting language, which would be used to create client-side scripts to run in Netscape Navigator.
In 1995, Netscape employed Brendan Eich to develop a scripting language.
In May 1995, Brendan Eich developed the new scripting language code-named "Mocha" in just 10 days.
In September 1995, it was called LiveScript when first shipped as part of Netscape Navigator 2.0 beta.
In December 1995, the name was changed to JavaScript for the official release of Netscape Navigator 2.0.
JavaScript 1 was a great success and soon JavaScript 1.1 was released in Netscape Navigator 3.
Technically, Java and JavaScript has little in common. In 1995, Java was the hot new programming language. The idea was that a new scripting language would look like Java but be an object-based language. As per Eich's statement, “I was under marketing orders to make it look like Java...........". So, the JavaScript name is considered to be a marketing tactic by Netscape.
Examples of JavaScript Programs in the early 90s
Initial examples of JavaScript programs were, web developers can “write a JavaScript function to verify that users enter valid information into a form requesting a telephone number or zip code,” or “use JavaScript to perform an action (such as play an audio file, execute an applet, or communicate with a plug-in) in response to the user opening or exiting a page.” Other examples include: Ticker Tape (“ticker tape scrolling text”), Rainbow (“gives the nice rainbow effect to your text”), and bgcolor Fade (“fades the bgcolor in and out on load and unload of a page”).
JavaScript Standardization
In 1996, Microsoft jumped into the competition and decided to include the scripting language in Internet Explorer 3 with their own implementation of JavaScript called JScript.
JavaScript in Netscape and JScript in Internet Explorer, both of these implementations were noticeably different from each other. This has led to another dilemma for developers to make their websites compatible with both browsers.
In 1996, Netscape submitted JavaScript to ECMA International to define a standard specification that should be followed by all web browsers.
ECMA stands for European Computer Manufacturer's Association. The ECMAScript (ES) is standard for scripting languages, including JavaScript, JScript and ActionScript. Its core purpose is to define the specifications to standardize the core features of a scripting language and how those features should be implemented. The ECMA-262 defines the ECMAScript language specification.
Following is the history of ECMA-262 editions and their implementation in different web browsers.
- In 1997, JavaScript became an ECMA standard (ECMA-262).
- In 1997, ECMA-262, 1st edition, (ES1) was released.
- In 1997, Microsoft Internet Explorer 4 (IE 4) was the first browser to support ES1.
- In 1998, ECMA-262, 2nd edition (ES2) was released.
- In 1998, Netscape 4.2 was released with JavaScript 1.3.
- In 1999, Microsoft Internet Explorer 5 (IE 5) was the first browser to support ES2.
- In 1999, ECMA-262, 3rd edition (ES 3) was released.
- In 2000, Microsoft Internet Explorer 5,5 (IE 5,5) was the first browser to support ES3.
- In 2000, Netscape 6.2 was released with JavaScript 1.5.
- In 2000, Firefox 1 was released with JavaScript 1.5.
- ECMA-262, 4th edition (ES4), was abandoned.
- In 2009, ECMA-262, 5th edition (ES5) was released.
- In 2011, Microsoft Internet Explorer 9 (IE 9) was the first browser to support ES5.
- In 2011, Firefox 4 was released with JavaScript 1.8.5.
- In 2012, Safari 6 supports ES5.
- In 2012, Chrome 23 supports ES5.
- In 2013, Firefox 21 supports ES5.
- In 2013, Opera 15 supports ES5.
- In 2014, all browsers support ES5.
- In 2015, ECMA-262, 6th edition (ES6) was released.
- In 2016, Safari 10 supports ES6.
- In 2016, Chrome 51 supports ES6.
- In 2016, Opera 38 supports ES6.
- In 2017, Firefox 54 supports ES6.
- In 2017, Microsoft Edge 15 supports ES6.
To know more about difference between HTML & JavaScript and CSS & JavaScript. You can read following tutorials: