---
id: 66c742d045c9fc2e09fa64b1
title: Step 19
challengeType: 1
dashedName: step-19
---

# --description--

The last change to make to the grocery list is to update the first item in the list.

In previous lessons, you learned how to update an item using bracket notation and the index of the item you want to update.

Here is a reminder of how to update an item in an array:

```js
const array = [1, 2, 3, 4, 5];

array[0] = 10;
// Result: [10, 2, 3, 4, 5]
console.log(array); 
```

Update the first item in the `shoppingList` array to be `"Canola Oil"`.

# --hints--

You should update the first item in the `shoppingList` array to be `"Canola Oil"`.

```js
assert.equal(shoppingList[0], "Canola Oil");
assert.notEqual(shoppingList[1], "Vegetable Oil");
```

# --seed--

## --seed-contents--

```js
console.log("Grocery shopping list");

const shoppingList = [];

console.log("It will be nice to have some fruit to eat.");

shoppingList.push("Apples");

function getShoppingListMsg(arr) {
  return `Current Shopping List: ${arr}`;
}

console.log(getShoppingListMsg(shoppingList));

shoppingList.push("Grapes");
console.log(getShoppingListMsg(shoppingList));

console.log("It looks like we need to get some cooking oil.");

shoppingList.unshift("Vegetable Oil");
console.log(getShoppingListMsg(shoppingList));

shoppingList.push("Popcorn", "Beef Jerky", "Potato Chips");
console.log(getShoppingListMsg(shoppingList));

console.log("This looks like too much junk food.");

shoppingList.pop();
console.log(getShoppingListMsg(shoppingList));

console.log("It might be nice to get a dessert.");

shoppingList.unshift("Chocolate Cake");
console.log(getShoppingListMsg(shoppingList));

console.log("On second thought, maybe we should be more health conscious.");

shoppingList.shift();

--fcc-editable-region--

--fcc-editable-region--
```
