Question

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";

Answers

There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions