So , this should be a very simple question.
I have set this variable named ShortGroceryList = groceryList.shift(). I was expecting the same value to be the output when I log both in different console.log statement but that’s not what happens,
The output on the screen goes like this :
orange juice when I log => console.log(ShortgroceryList)
bananas when I log =>console.log(groceryList.shift())