JS Introduction

Introduction

JavaScript is the client-side scripting language most popular and widely used. Scripting on the client-side is about scripts running on our web browser. JavaScript is designed to add web

pages with interactivity and dynamic effects by manipulating the returned content on a web server. JavaScript is object-oriented, and also contains syntatical similarities with the Java

programming language. In no way is JavaScript linked with Java. ECMA (European Computer Manufacturers Association) officially maintained JavaScript as ECMAScript. The newest

major version of the ECMAScript standard is ECMAScript 6 (or ES6).

 

History

In the mid 1990s JavaScript was developed by Netscape in the form of LiveScript. The JavaScript was subsequently renamed in 1995, and in 1997 it became an ECMA standard. Now JavaScript is the standard client-side scripting language for web-based applications, and it is supported by virtually all web browsers available today, such as Google Chrome, Mozilla Firefox, Apple Safari, etc.

This tutorial was designed for beginners of JavaScript to help them understand JavaScript's basic functionality for building dynamic web pages and web applications.

What We Can Do with JavaScript

With JavaScript there's a lot more we can do.

  • We can modify the content of a web page by adding or removing elements.
  • We can change the style and position of the elements on a web page.
  • We can monitor events like mouse click, hover, etc. and react to it.
  • We can perform and control transitions and animations.
  • We can create alert pop-ups to display info or warning messages to the user.
  • We can perform operations based on user inputs and display the results.
  • We can validate user inputs before submitting it to the server etc.

 

Audience

This tutorial was developed for beginners to JavaScript to help us understand JavaScript's basic functioning in building dynamic web pages and web apps.

Prerequisites

It is assumed that the reader has a previous knowledge of HTML coding for this tutorial. It would help if the reader was exposed to OOP concepts and a general idea on how to create an online application. It would help. It would help.

Examples

<!DOCTYPE html>
<html> <body> <h2>My First JavaScript</h2> <button type="button" onclick="document.getElementById('demo').innerHTML = Date()"> Click me to display Date and Time.</button> <p id="demo"> </p> </body> </html>

Output

My First JavaScript