JavaScript is one of the most used programming languages in the world, although with a history of ups and downs, its consolidated presence in the Olympus of great languages such as C, C++ and Java is certain. The following table, taken from the TIOBE Index , testifies to the growth in popularity of this language:
Figure 1. TIOBE Index Statistics

A similar trend is also recorded by another indicator of popularity of programming languages: PYPL
The huge diffusion of JavaScript is mainly due to the flourishing of numerous libraries created with the aim of simplifying programming on the browser, but also to the birth of server-side frameworks and in the mobile world that support it as the main language.
Many JavaScript developers first learned about various libraries like jQuery, MooTools, Prototype and others and their actual knowledge of the language often remained very limited.
Other JavaScript users come from development experiences in other programming languages and very often this generates confusion or underestimation of the potential of the scripting language. For example, many Java, C++ or C# developers , more or less unconsciously transfer the characteristics of their language to JavaScript, given the syntactic similarity, but this sometimes causes errors and an incorrect evaluation of its actual capabilities.
Finally, it should be noted that not all JavaScript users are real developers. Many are users who in one way or another have found themselves having to integrate Web pages with JavaScript, often starting with a copy and paste of blocks of code found around the Internet.
The widespread use of JavaScript does not necessarily indicate actual knowledge of it.
However, given the growing importance of this tool, even outside the Web, it is appropriate on the one hand to rediscover its basic syntactic notions and on the other to explore more advanced concepts that have been added to the language standard over time, in constant transformation. There is no doubt that focusing on JavaScript guarantees the acquisition of skills that are also valid for the future.
In this guide we will explore the basic elements of the language, from variable declarations to data types, from statements to functions. We will analyze its “historical” relationship with HTML and the browser and we will see the support for objects and the relationship with the OOP model , up to the use of regular expressions , Ajax and give a vision of the technologies that are moving around the language. All updated of course to the current state of technology.
History and evolution of language
JavaScript was created in 1995 by Netscape and released with version 2.0 of its browser, Netscape Navigator , initially under the name LiveScript and soon after with its current name, initially creating no small amount of confusion with Java, which was making its debut that very year to great attention from the software world.
JavaScript immediately added to HTML pages the ability to be modified dynamically, based on the user’s interaction with the browser (client side). This was thanks to the calculation and document manipulation functions that could be performed even without involving the server. This feature was emphasized during the 90s with the name that was given to the HTML-JavaScript pair: Dynamic HTML (DHTML) .
In 1997, based on the Netscape language, the ECMA-262 standard was born , defined by the industry standardization organization ECMA International , which represented the specifications of the ECMAScript language . The language defined by ECMA, in the versions that followed, is the point of reference not only for JavaScript, but also for other languages such as ActionScript, WMLScript and QtScript.
The need to make the Web increasingly interactive and dynamic led to the emergence of competing technologies: Flash, ActiveX, and Java Applets. These technologies provided the ability to create more impactful features and graphic effects than JavaScript could, but they required specific runtimes or, like ActiveX controls, only ran on a specific browser.
The competition between external components and JavaScript lasted for several years and saw Flash dominate in user interaction and advertising formats, to the detriment of JavaScript, which seemed destined for a slow decline.
Flash, a Macromedia technology later acquired by Adobe, became popular thanks to the simplicity of creating content and interfaces, but also thanks to the lack of a univocal implementation of the HTML and JavaScript standards, mainly due to the so-called Browser War , or the competition between vendors, started by Microsoft and Netscape and ended only in the second half of the 2000s with the advent of a more careful adherence to the W3C standards.
It was the advent of Ajax technology, the ability to communicate asynchronously with the server via script, that brought JavaScript back to the forefront.
The renewed interest in the language with new application potential has given birth to the so-called Web 2.0 and has caused numerous libraries to flourish with the aim of simplifying some of the most common activities and bypassing the differences that still existed between Browsers, favoring unified and faster programming.
We have in our hands a mature language that can be used in different contexts no longer necessarily linked to the Web.
The evolution of the language on one hand and the advent of HTML5 on the other have further amplified the application possibilities of the language, even outside of the simple Web browser. JavaScript can also be used server-side, in desktop and mobile applications. It is therefore no longer a simple glue between HTML code and the user.
As of now, the latest official version of ECMAScript is version 6, released in June 2015. This version of the specification, generally referred to as ES6 or ECMAScript 2015, adds some interesting new features to the scripting language, and these will be highlighted throughout this guide. However, their support by the latest browsers is not entirely complete. We will see how, despite everything, the new JavaScript features derived from ES6 can be used right now.