Question: Write code to declare array that contains names of 7 stores. Then write a statement that will call a function that will return the name
- Write code to declare array that contains names of 7 stores. Then write a statement that will call a function that will return the name of the store randomly.
THIS WAS MY ANSWER, but it was wrong------>
var storeName = new array(Macys, WholeFoods, Ikea, JcPenny, Target, TjMaxx, OldNavy);
function storeName(store) {
var storeName = [Macys, WholeFoods, Ikea, jcPenny, Target, TjMaxx, OldNavy];
var Store = store.getStore();
return storeName;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
