How do I add a new object to an array and how do I return the update array with the new object added to the end? this is the data I have!
newCandy = { candy:"Skittles" , inStock:200, 10, };
and this is the function
function addNewcandy(inventory,newCandy)