When I have stored the values in an array,
const greens = [
{ name: "cedar", count: 2 },
{ name: "fir", count: 6 },
{ name: "pine", count: 3 }
];
var greensSplice = greens.splice(0,1);
when I splice to remove the initial index value and change the position of the index, I wish to get the removed index value
spliceis the index at which the element(s) are to be removed or added. So if you dosplice(1, the index at which you're removing is 1. So either repeat the 1 or save it in a variable.