I currently have multiple objects that look like:
let object1 = {
xyz: 'xyz1',
arr: []
},
object2 = {
xyz: 'xyz2',
arr: []
},
object3 = {
xyz: 'xyz3',
arr: []
}
This is getting very long and redundant. Is there anyway I can create 3 arrays like:
let objName = ["object1", "object2", "object3"]
let xyzArr = ["xyz1", "xyz2","xyz3"]
let theArr = [[], [], [] ]
Is there anyways to correspond them to each other?