const lineExampleOne = [{
weight:150,
floor: 2,
},{
weight:200,
floor: 3,
},{
weight:120,
floor: 5,
},{
weight:80,
floor: 2,
},{
weight:180,
floor: 4,
},{
weight:170,
floor: 4,
}];
let newArray = [];
lineExampleOne.forEach((person)=>{
newArray.push(person);
})
console.log(newArray);
this returns something like this [object Object],[object Object]
etc…
How do I correctly add each object to my empty newArray? How do I properly access each objects properties from my newArray? and is there a way to test how many unique values I have for floors and weight of all the objects in my newArray?