The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
Use the following syntax to create
an Array object −
var fruits = new Array( "apple", "orange", "mango" );
The Array parameter is a list of strings or
integers. When you specify a single numeric parameter with the Array
constructor, you specify the initial length of the array. The maximum
length allowed for an array is 4,294,967,295.
<!DOCTYPE html>
<html>
<head>
<title>JavaScript</title>
<script>
var student = [
{name : 'Ram', age : 15},
{name : 'Karan', age : 13},
{name : 'Rahul', age : 14},
];
console.log(student);
for(var a= 0;a < student.length;a++){
document.write(student[a].name + " " + student[a].age + "<br>");
}
</script>
</head>
<body>
</body>
</html>