Odd lesson problem ( making arrays, )

when i run the tests, it says the second item in the array must be a number. i am probably forgetting something from a prev lesson, setting it as an integer or something?

// Only change code below this line
const myArray = ["hello", "5"];
// is 5 not a number?

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14324.62.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.77 Safari/537.36

Challenge: Store Multiple Values in one Variable using JavaScript Arrays

Link to the challenge:

That is not a number. That is a string that has a number in it (as text). Without the quotes it would be a number.

duh! thanks! should’ve known…

1 Like

Hey, we all start somewhere.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.