0% found this document useful (0 votes)
6 views2 pages

Creation of Array and Object

The document outlines how to create a JavaScript array named 'university' that stores details about universities, including their colleges and the students in those colleges. It provides an example structure showing the hierarchy of universities, colleges, and students with relevant attributes. The example includes placeholders for names and ages of students.

Uploaded by

rsibi9929
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Creation of Array and Object

The document outlines how to create a JavaScript array named 'university' that stores details about universities, including their colleges and the students in those colleges. It provides an example structure showing the hierarchy of universities, colleges, and students with relevant attributes. The example includes placeholders for names and ages of students.

Uploaded by

rsibi9929
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

JS: Creation of Array and Object

Create Array called as university


Store all the university details
 Store the colleges belongs to the university.
 Store the students belongs to the colleges
Example:

var uni = [
{
universityName: "A",
year: 2000,
colleges: [
{
collegeName: "a",
year: 2005,
students: [
{
firstname: "",
lastName: "",
age: ""
},
{
firstname: "",
lastName: "",
age: ""
}
]
},
{
collegeName: "a",
year: 2005,
students: [
{
firstname: "",
lastName: "",
age: ""
},
{
firstname: "",
lastName: "",
age: ""
}
]
}
]
}

You might also like