Introduction
JavaScript is a scripting language that is usually used in websites and is then executed by the visitor's browser. Originally, in 1995, JavaScript was still called LiveScript. It was developed by Netscape.
JavaScript ensures that web pages can be built dynamically and adapted to the user. Complex control queries can be programmed in JavaScript and linked to backend services to check the entries of the visitors. Extensive browser games are written in JavaScript.
JavaScript is a cross-platform, object-oriented scripting language. It is a compact and resource-saving language. Within a host environment, JavaScript can be linked to the objects in its environment to control them programmatically.
Watch the following video introducing the JavaScript.
Overview
JavaScript includes a standard library of objects such as Array, Date, and Math, as well as a core of language elements such as operators, control structures, and statements. The JavaScript core can be extended for a variety of use cases by adding additional objects to it.
JavaScript is defined in a declarative functional programming styles. It is prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented and imperative.
The standard for JavaScript is ECMAScript. As of 2012, all modern browsers fully support ECMAScript 5.1. Older browsers support at least ECMAScript 3. On 17 June 2015, ECMA International published the sixth version of ECMAScript, which is officially called ECMAScript 2015 and was initially referenced as ECMAScript 6 or ES6. Since then, there has been a new version of ECMAScript standards every year.
JavaScript borrows most of its syntax from Java, but is also influenced by languages such as Awk, Perl and Python.
Language
JavaScript is case-sensitive (distinguishes between upper and lower case) and uses the Unicode character set.
Client-side JavaScript extends the core language by providing objects to control a browser and its Document Object Model. For example, client-side extensions allow an application to create elements in an HTML form and respond to user events such as mouse clicks, form input and page navigation.
Server-side JavaScript extends the core language by providing objects that are relevant to the execution of JavaScript on a server. For example, server-side extensions allow an application to communicate with a database, get information from one call to the application to the next, or make changes to files on a server
In JavaScript, statements are called statements and are separated by a semicolon . A semicolon is not necessary if each statement is on a new line. If several statements are written in one line, each must be separated by a semicolon. It is also common practice to write a semicolon after each statement. The source code of JavaScript is read by the interpreter and converted into sequences of input elements such as JavaScript tokens, control characters, character breaks and object instances. ECMAScript describes keywords reserved for the interpreter as well as object instances and has built-in rules for automatic semicolon insertion (ASI) to terminate statements. However, it is recommended to end each statement with a semicolon; this avoids unwanted side effects.
When the browser encounters a block of JavaScript, it generally runs it in order, from top to bottom. This means that you need to be careful what order in which you put things.
JavaScript is applied to your HTML page in a similar manner to CSS. Whereas CSS uses <link>
elements to apply external stylesheets and <style>
elements to apply internal stylesheets to HTML, JavaScript only needs one friend in the world of HTML — the <script>
element.


You can place any number of scripts in an HTML document.
Scripts can be placed in the <body>
, or in the <head>
section of an HTML page, or in both.
Scripts can also be placed in external files. External scripts are practical when the same code is used in many different web pages.
JavaScript files have the file extension, .js
.
To use an external script, put the name of the script file in the src attribute of a <script>
tag.

