var shoppingList = ["milk", "eggs", "sugar", "bread", "cake"];

JavaScript
Which line of code will correctly change "cake" to "apples"?

shoppingList["cake"] = "apples";
JavaScript

shoppingList["apples"] = "cake";
JavaScript

shoppingList[4] = "apples";
JavaScript

shoppingList[5] = "apples";

shoppingList[4] = "apples";