Learn JavaScript Programming

A scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else.

JS Introduction
JS Control flow
JS Functions
JS Objects
JS Types
Exceptions and Modules
JS ES6
JavaScript Asynchronous
Miscellaneous

Getting Started With JavaScript

JavaScript is a cross-platform, object-oriented scripting language used to make webpages interactive e.g., having complex animations, clickable buttons, popup menus, etc.
There are also more advanced server side versions of JavaScript such as Node.js, React js, vue js etc.

JavaScript and the ECMAScript specification

JavaScript is standardized at Ecma International — the European association for standardizing information and communication systems (ECMA was formerly an acronym for the European Computer Manufacturers Association) to deliver a standardized, international programming language based on JavaScript. This standardized version of JavaScript, called ECMAScript, behaves the same way in all applications that support the standard.

  1. Validating User's Input :

    JavaScript is very useful while using forms. It has the capability to validate user input for errors and also saves time. If the user leaves a required field empty or the information is incorrect, JavaScript checks for them before sending the data over to the server.

    For example :
    Try to set password less than 6 digits and submit , it will validate to set minimum 6 digits password :

    Run code

  2. Event handling :

    An event is an action or an occurrence in a system that communicates about said occurrence so that you can respond to it somehow. For example, a user clicks on a button, and the system tells you to respond to the button click event with an action, say an information box.

    For example : Count the number of times the button is clicked using JavaScript

    Likes count 0
    Run code

  3. Greater control :

    JavaScript provides greater control to the browser rather than being completely dependent on the web servers. JavaScript provides additional functionalities that help reduce server load and network traffic.

  4. Platform Independent

    JavaScript is Platform Independent, which means you need to write the script once and can run it on any platform or browser without affecting the output of the Script.. Thus it can run on Windows, Macintosh, and other browser-supported systems.

  5. Generating HTML Content

    JavaScript has very handy features to dynamically generate HTML content for the web. It allows us to add text, links, images, tables, etc. or to change html content design after an event occurrence.

    For example :

    Run code

  6. Detecting the user's Browser and OS

    JavaScript is very capable in the detection of the user's browser and OS information. Though JavaScript runs on every platform, there may occur a situation where we need the user's browser before processing. This can be helpful for writing code that results in different outputs in different browsers.

Now that you know what is JavaScript, let's learn the ways to execute JavaScript from browser as well as server side


Share this page on :