Javascript Tutorial for Beginners


JavaScript is a dynamic programming language that's used for web development,It is used both on the client-side and server-side that allows you to make web pages interactive.Where HTML and CSS are languages that give structure and style to web pages, JavaScript gives web pages interactive elements that engage a user.It is an interpreted programming language with object-oriented capabilities

JavaScript was created in May 1995 in 10 days, by Brendan Eich. Eich worked at Netscape and implemented JavaScript for their web browser, Netscape Navigator.Initially, JavaScript’s name changed several times:

  • Its code name was Mocha.
  • In the Netscape Navigator 2.0 betas (September 1995), it was called LiveScript.
  • In Netscape Navigator 2.0 beta 3 (December 1995), it got its final name, JavaScript.

Why Javascript..?


  • All popular web browsers support JavaScript as they provide built-in execution environments.
  • JavaScript follows the syntax and structure of the C programming language. Thus, it is a structured programming language.
  • JavaScript is a weakly typed language, where certain types are implicitly cast (depending on the operation).
  • JavaScript is an object-oriented programming language that uses prototypes rather than using classes for inheritance.
  • It is a light-weighted and interpreted language.

Standardizing JavaScript ECMA

ECMA-262 is hosted by Ecma International. It is the primary standard

The language described by these standards is called ECMAScript, not JavaScript. A different name was chosen because Sun (now Oracle) had a trademark for the latter name. The "ECMA" in "ECMAScript" comes from the organization that hosts the primary standard.

The original name of that organization was ECMA, an acronym for European Computer Manufacturers Association. It was later changed to Ecma International (with "Ecma" being a proper name, not an acronym) because the organization’s activities had expanded beyond Europe. The initial all-caps acronym explains the spelling of ECMAScript

In principle, JavaScript and ECMAScript mean the same thing. Sometimes the following distinction is made:

  • The term JavaScript refers to the language and its implementations.
  • The term ECMAScript refers to the language standard and language versions. Therefore, ECMAScript 6 is a version of the language (its 6th edition).
Edition Date of Published Name Description
1June 1997ECMAScript 1First version of the standard
2June 1998ECMAScript 2Small update to keep ECMA-262 in sync with the ISO standard.
3December 1999ECMAScript 3Adds many core features – regular expressions, better string handling, new control statements [do-while, switch], try/catch exception handling
4June 2003ECMAScript 4(abandoned in July 2008): Would have been a massive upgrade (with static typing, modules, namespaces, and more), but ended up being too ambitious and dividing the language’s stewards.
5December 2009ECMAScript 5Brought minor improvements – a few standard library features and strict mode.
5.1June 2011ECMAScript 5.1Another small update to keep Ecma and ISO standards in sync
6June 2015ECMAScript 2015 (ES2015)A large update that fulfilled many of the promises of ECMAScript 4. This version is the first one whose official name – ECMAScript 2015
7June 2016ECMAScript 2016 (ES2016)First yearly release. The shorter release life cycle resulted in fewer new features compared to the large ES6.
8June 2017ECMAScript 2017 (ES2017)Second yearly release.
9June 2018ECMAScript 2018 (ES2018)New features include the spread operator and rest parameters (...) for object literals, asynchronous iteration, Promise.prototype.finally and additions to RegExp.
10June 2019ECMAScript 2019 (ES2019) Added features include, but are not limited to, Array.prototype.flat, Array.prototype.flatMap, changes to Array.sort and Object.fromEntries
11June 2020ECMAScript 2020 (ES2020)In addition to new functions, this version introduces a BigInt primitive type for arbitrary-sized integers, the nullish coalescing operator, and the globalThis object.
12June 2021ECMAScript 2021 (ES2021)This version introduces the replaceAll method for strings,Promise.any,AggregateError,logical assignment operators (??=, &&=, ||=), WeakRef,FinalizationRegistry,separators for numeric literals,Array.prototype.sort

List of Programs


JS Practical Questions & Answers


JS Practical Project