JavaScript Tutorial

You will learn all about JavaScript in this tutorial from basic to advance.

What is JavaScript ?

JavaScript is a client and server-side object-based scripting language that is used to make interactive Web pages. A scripting language is a lightweight programming language with less complexity.

JavaScript is the most usually used scripting language to add dynamism and interactivity to Web pages. This is because JavaScript, written on the client-side, executes on a client browser, thereby reducing the load on the server.

JavaScript is an Interpreted Language

JavaScript is an interpreted language, which implies that scripts written to JavaScript are processed line by line. These scripts are interpreted by the JavaScript interpreted, which is a built-in component of the Web browser.

JavaScript can be written on the client-side as well server-side. Client-side JavaScript allows you to validate only those programs that execute and produce the result on the client-machine. In counterpoint/contrast, server-side JavaScript validates only those programs that execute on the server. JavaScript includes various built-in objects and features that can be used to make your HTML pages dynamic.

JavaScript is platform-independent

JavaScript is platform-independent, which implies that you need to write the script once and can run it on any platform or browser without affecting the output of the script.

Why to Learn JavaScript ?

There are the three languages, all web developers must know, these are the following:

So to program the behaviour of Web pages, you must have to learn JavaScript. You will learn all about JavaScript in this tutorial.

Advantages of JavaScript

Here are the advantages of JavaScript:

Here is a simple JavaScript example.

<!DOCTYPE HTML>
<html>
<head>
   <title>JavaScript Tutorial</title>
</head>
<body>

<h2>JavaScript Tutorial - Learn JavaScript</h2>
<p id="test">This is a simple Example of JavaScript.</p>

<button type="button"
onclick="document.getElementById('test').innerHTML = 'Welcome to JavaScript!'">
Click Me</button>

</body>
</html>

Save the above file with .html extension like filename.html, and open it in your browser, the web page will look like:

javascript tutorial

Now click, on the button Click Me, you will watch Welcome to JavaScript! in the place of This is a simple Example of JavaScript. as shown in this image:

learn javascript

You can also try it with your own, by clicking on the below button:

JavaScript Tutorial - Learn JavaScript

This is a simple Example of JavaScript.

You will learn all about JavaScript one by one in this tutorial series.

Audience

This tutorial is designed and developed to those JavaScript lover who are beginner in this field and wants to get some knowledge about it from very basic to an advance level as we have included as many code as required in each and every chapter in this JavaScript tutorial series.

Therefore you can easily follow this JavaScript tutorial series to get or achieve knowledge about JavaScript.

Prerequisites

Before start learning JavaScript, you must have some prior knowledge about HTML as JavaScript is a languge used to trigger HTML elements to perform some user based actions.

If you have some prior knowledge of HTML and how to program, then it becomes very easy to learn JavaScript here.

JavaScript Online Test


« fresherearth Home Next Tutorial »