For loop


simple for loops same as in c,c++ or in other programing language.
var i;
for(i=o;i<10;i++){
  document.write(i);

} 

Do-while loop


special about do while loop is that its execute one time even in false condition .
      var i=10;
      do{
        document.write(i);
      }while(i!=0); 

While loop


simple for loops same as in c,c++ or in other programing language.

special about while loop is that when we don't know how many time loop have to execute then we use while loop

  var i=10;
  while(i!=0){
    document.write(i);
  }
   

Associate Array


Associative Array in JavaScript. Associative arrays are dynamic objects that the user redefines as needed. When you assign values ​​to keys in a variable of type Array, the array is transformed into an object, and it loses the attributes and methods of Array.
          var o = new Object();
             o["one"] = 1;
             o["two"] = 2;
          o["three"] = 3;
             for(var i in o)
              {
             document.write(i + "=" + o[i] + '');
            }
                          
                            
CONTENTS