S01L02 – History and terminologies of JavaScript


History and Terminologies of JavaScript

Table of Contents

  1. Introduction
  2. The Evolution of JavaScript
  3. Key Terminologies in JavaScript
  4. Comparison with Other Languages
  5. Sample Code and Explanation
  6. Conclusion

Introduction

JavaScript, often referred to as the language of the web, plays a pivotal role in modern web development. Understanding its history and key terminologies not only enhances your programming skills but also helps you appreciate its evolution.

Importance of Knowing JavaScript’s History:

  • Provides context for its current capabilities.
  • Offers insight into the reasons behind certain design choices.
  • Helps bridge the gap between beginners and professionals.

The Evolution of JavaScript

Milestones in JavaScript’s History:

Year Event Description
1995 Creation of JavaScript Developed in just 10 days by Brendan Eich.
1996 Standardization Became ECMAScript under the guidance of ECMA.
2009 Introduction of Node.js Enabled JavaScript to run server-side.
2015 Release of ECMAScript 6 (ES6) Added features like let, const, and classes.

Key Terminologies in JavaScript

1. ECMAScript:

A standardized version of JavaScript. ECMAScript defines the rules, details, and guidelines for JavaScript implementations.

2. Syntax:

The set of rules that define the structure of JavaScript programs.

3. Hoisting:

A behavior where variable and function declarations are moved to the top of their containing scope during compilation.

4. Closures:

A function that retains access to its parent scope, even after the parent function has closed.

Comparison with Other Languages

Feature JavaScript Java Python
Typing Dynamic Static Dynamic
Primary Usage Web development Backend and desktop apps General-purpose
Execution Browser and server-side (Node) JVM Interpreted

Sample Code and Explanation

Example: Understanding Closures

Explanation:

  • The outerFunction creates a closure by returning innerFunction.
  • The innerFunction retains access to the outerVariable, even after outerFunction execution completes.

Output:

Conclusion

JavaScript has transformed from a simple scripting language to a robust, full-fledged programming language powering millions of websites and applications. By understanding its history and terminologies, developers can leverage its capabilities more effectively.