When I try to do the push and unshift examples that you use in this part:
food = [...food, 'Coffee'];
food = ['Coconut', ...food];
food = ['Coconut', ...food, 'Coffee'];
I get the message TypeError {"invalid assignment to const 'food'"} in jconsole.com.
Is this because the array 'food' is previously defined as const and therefore not assignable?
Don't you need to give the array a new name (e.g. food1 = ['Coconut', ...food, 'Coffee'];)?
Link to content: Learn to Code with JavaScript - Section 5