In this lesson we don’t learn the real difference between const
and let
. Or am I missing something?
1.
Below the two existing arrays, re-assign the element in index 0
of condiments
to 'Mayo'
.
Log the updated array, condiments
, to the console.
Stuck? Get a hint
2.
Below your code from Step 1, reassign condiments
to be a new array that contains a single string ['Mayo']
Log the result to the console.
Notice that you can re-assign elements in an array and re-assign an entire new array to a variable declared using the let
keyword.
Stuck? Get a hint
3.
Below your code from Step 2, re-assign the last item from the utensils
array to 'Spoon'
.
Log the updated array to the console.