In this JavaScript – Part I Tutorial you will learn about Array Definition, Defining an Array in JavaScript, Shorter form, Literal Array, Accessing the elements in an array, Editing the values or elements in an array, Single Dimensional Array in JavaScript
The array concept is used to store a set of values in a single variable name. So this is a very important concept in any programming language, Let us see how to define and handle arrays in JavaScript in this session.
Having got a brief idea about Single Dimensional Array in JavaScript let us see in this section how to define and access Two Dimensional Array in JavaScript.
In this Java Script tutorial you will learn about Introduction to Java Script, Origin of Java Script, Need of Java Script, Differences between Java and Java Script and Uses or Advantages of Java Script.Java Script was developed by Netscape by a person named as Brendan Eich. Though it was introduced as a client0side scripting languge and is most geenrally used like that there is no restriction for one using it in server side also. The original name that Java script had when it was intrduced was Livescript.
Having got a brief introduction about Java Script in the previous chapter let us see the features of Java Script in this section.While designing using HTML the persons doing the designing using HTML need to be a good designer and would generally, need not be a good programmer. So in such situation the Java Script acts as a programming tool and is a powerful scripting language and helps the HTML designers to design the website or webpage effectively and interactively in a very simple and efficient way.
Just like any programming language the variables in Java Script are also used to store values. The value of the variable can be edited as required by the programmer.Some of the rules for forming variable names are as follows: Variable names are case sensitive.They must begin with a letter or the underscore character.Having seen about the simple rules for framing variables names now let us see how to declare a variable name.
Having known briefly about the features of Java Script let us start with a lighter section of knowing about how to pace a Java Script within a HTML page, and how to execute this and so on.This can be done by using the area Java Script.
Just like any other programming language the conditional statements in Java Script are used for decision making purpose.If a programmer wants to execute certain statements only , when a desired condition is satisfied or have the true value then this conditional statement namely if statement can be used.
In continuation of the previous section let use see the remaining conditional statements in Java Script in this section.If there are many branching r conditions to be decided based on which actions must be executed then the programmer can go for if...else if....else statement.
There are actually three types of popup boxes that can be created using Java Script. As per the needs of the user the programmers creates any of these types of popup box using Java Script.The three kinds of popup boxes that can be created using Java Script are namely.
As a continuation of the earlier section where we have seen alert box, we will see in section briefly about confirm box and prompt box.The confirm box is one that pops up with two buttons namely OK and Cancel. This box namely Confirm box is used to verify from the user for acceptance. If the user accepts then the user presses the Ok button and there by the confirm box returns with a value true and if the user rejects then the user presses the cancel button and there by the confirm box returns false value.