History of JavaScript
2.1 The Birth of JavaScript (1995)
• Created by Brendan Eich in just 10 days while working at Netscape.
• Originally called Mocha, later renamed LiveScript, and finally JavaScript.
• Purpose: make websites interactive (e.g., form validation, simple animations).
• Originally called Mocha, later renamed LiveScript, and finally JavaScript.
• Purpose: make websites interactive (e.g., form validation, simple animations).
2.2 Early Days
• Netscape Navigator first shipped JavaScript.
• Microsoft created a competitor called JScript in Internet Explorer.
• Resulted in browser wars (1990s) → inconsistent behavior across browsers.
• Microsoft created a competitor called JScript in Internet Explorer.
• Resulted in browser wars (1990s) → inconsistent behavior across browsers.
2.3 Standardization (1997 onwards)
• To avoid chaos, JavaScript was standardized by ECMA International as ECMAScript (ES).
• ECMAScript 1 (ES1) was released in 1997.
• Each version added new features and improvements.
• ECMAScript 1 (ES1) was released in 1997.
• Each version added new features and improvements.
2.4 Key Versions of JavaScript
• ES3 (1999): Regular expressions, try/catch, better string handling.
• ES5 (2009): JSON support, strict mode, array methods like forEach, map.
• ES6 / ES2015: Biggest update! Introduced let, const, arrow functions, classes, promises, modules.
• Later versions (ES2016+): Async/await, optional chaining, modules, modern features every year.
• ES5 (2009): JSON support, strict mode, array methods like forEach, map.
• ES6 / ES2015: Biggest update! Introduced let, const, arrow functions, classes, promises, modules.
• Later versions (ES2016+): Async/await, optional chaining, modules, modern features every year.
2.5 Modern JavaScript
• Runs not only in browsers but also on servers (via Node.js).
• Powers front-end frameworks (React, Angular, Vue).
• Used in mobile apps, desktop apps, IoT, AI tools.
• Today, JavaScript is the most popular language on the web.
• Powers front-end frameworks (React, Angular, Vue).
• Used in mobile apps, desktop apps, IoT, AI tools.
• Today, JavaScript is the most popular language on the web.