Can we use multiple of array in one object?

can we use multiple of array in one object? if yes give some example.

2 Likes

Yes we can, The Objects are a data structure that hold key/value pairs we can represent multiple arrays with single object like this. Hope this helpful to you

var Organization = {
Employee : {
1: [‘Emp A’, 10],
2: [‘Emp B’, 16],
3: [‘Emp C’, 55]
}
};

3 Likes

Hi @nagesh28katke ,

You asked a good question, and we can use as many arrays as we want in a single object.
for ex:

var studentsInfo={
                             ["name":"A", "Age":16, "Address":XyZ Street, NY],
                             ["name":"B", "Age":17, "Address":Xyb Street, NY],
                             [....],
                             [...]
                            }
3 Likes