JavaScript Example (Program)
Learn Details
  • Q. What is Array Object Value ?

    जहाँ array के अंदर Object value हो उसे हम Array Object Value कहते हैं

    What is the Syntax of Multiple Dimensional Array

    var array_name[
       object_name {property_a_1:value, property_a_2:value, property_a_3:value },
          object_name {property_b_1:value, property_b_2:value, property_b_3:value },
           ]
    
  • Program Example

    <script>
    // (Prongarm 1 
    var a =[
             {name:"Rahul", age:20},
             {name:"Ramesh", age:30},
             {name:"Sruresh", age:40},
          ]
    
          for(var b = 0; b<3; b++){
             document.write(a[b].name+" "+a[b].age+"<br>")
          }
    
    </script>
    Out Put : Rahul 20
    Ramesh 30
    Sruresh 40
    <script>
    // Table Format
    var a =[
             {name:"Rahul", age:20},
             {name:"Ramesh", age:30},
             {name:"Sruresh", age:40},
       ]        
    
    document.write(
    "<table cellspacing='0' cellpadding='10' border='1'>")
       document.write("<tr>")
    document.write("<td>Name</td> <td>Age</td>");
       document.write("</tr>");               
          for(var b = 0; b<3; b++){
     document.write("<tr>")
             document.write("<td>"+a[b].name+"</td><td>"+a[b].age+"</td>");
             document.write("</tr>")
          }
    document.write("</table>")
    
    </script>
    Out Put :
    Name Age
    Rahul20
    Ramesh30
    Sruresh40