Modify the new array
myArray so that it contains both a
string and a
number (in that order).
The example is: ````var sandwich = [“peanut butter”, “jelly”, “bread”]` .``` when i checked w3schools and the forum here: https://www.w3schools.com/js/js_arrays.asp it says the same
var cars = ["Saab", "Volvo", "BMW"];
but when i try:
var myArray = ["string", "number"];
it doesn’t work why? i also try replacing the word number with a 3 since it counts from 0
the error it gives me is: The second item in myArray should be a number. now i know that js reads from left to right so i change it
var myArray = ["number", "string"];
keep having the error what am i doing wrong?