JavaScript

JavaScript is a dynamic computer programming language. It is a lightweight language most commonly used as a part of web pages, which allows client-side script to interact with the user and make dynamic Web pages. it is an interpreted object-oriented programming language.

Earlier, JavaScript is known as LiveScript, Netscape changed its name to JavaScript may probably because of excitement being generated by Java.

JavaScript made its first appearance in Netscape 2.0 with the name LiveScript.


 

Client-Side JavaScript

Client Side JavaScript is the most notable kind of the language. The substance thought to be associated with or alluded by a HTML chronicle for the code to be interpreted by program.

It suggests that a page need not be a static HTML, anyway can consolidate projects that help out the customer, control the program, and continuously make HTML content.
The JavaScript client side framework gives various advantages over ordinary CGI specialist side substance. For example, you may use JavaScript to check if the customer has entered a real email address in a design field.
The JavaScript code is executed when the customer presents the construction, and simply expecting to be all the sections are real, they would be submitted to the Web Server.
JavaScript can be used to trap customer began events, for instance, button clicks, associate course, and various exercises that the customer begins unequivocally or surely.

Benefits of JavaScript
[+] Less Server Interaction

[+] Immediate criticism to the guests

[+] Increased Interactivity

[+] Richer Interfaces

Limitations of JavaScript

We can't regard JavaScript as an undeniable programming language. It does not have the accompanying significant highlights:

1. Customer side JavaScript doesn't permit the perusing or composing of documents. This has been saved for security reason.

2. JavaScript can't be utilized for systems administration applications in light of the fact that there is no such help accessible.

3. JavaScript doesn't have any multithreading or multiprocessor capacities.

JavaScript Development Tools

One of significant qualities of JavaScript is that it doesn't need costly improvement instruments. You can begin with a basic content manager like Notepad. Since it is a deciphered language inside the setting of an internet browser, you don't have to purchase a compiler. To simplify our life, different sellers have thought of pleasant JavaScript altering instruments. Some of them are recorded here:Microsoft FrontPage: Microsoft has built up a famous HTML proofreader called FrontPage. FrontPage additionally furnishes web engineers with various JavaScript instruments to aid the making of intelligent sites.Macromedia Dreamweaver MX: Macromedia Dreamweaver MX is an extremely well known HTML and JavaScript editorial manager in the expert web improvement swarm. It gives a few helpful prebuilt JavaScript

Syntax Example in JavaScript

 var x, y, z;       // Declare Variables
x = 5y = 6;      // Assign Values
z = x + y;         // Compute Values 

//Simple Javascript Program
var food = ['Apple','Bananas','Orange']
for (var i=0i<food.lengthi++)
{
    if(foods[i] == 'Apples') {
        alert(foods[i] + 'are my favorite!');
    }
    else {
        alert(foods[i] + 'are Okay');
    }
}

//Exmaple 1
var txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var sln = txt.length

//Example 2
var str = "Please locate where 'locate' occurs!";
var pos = str.indexOf("locate");