Tell us what’s happening:
I keep getting error on this code. Don’t know what’s wrong
Your code so far
// Only change code below this line
const myArray = ["I am", "3"];
console.log(myArray);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.4 Safari/605.1.15
Challenge: Basic JavaScript - Store Multiple Values in one Variable using JavaScript Arrays
Link to the challenge:
Learn to Code — For Free
GinaReg:
"3"]
This isn’t a number. That is why the test is failing
1 Like
Please I don’t understand. How am I supposed to write a number?
You will need to remove the ""
around the number.
In programming, things wrapped in single or double quotes represents a string.
Since the challenge wants you to use a number, it should not be inside quotes.
3 Likes
system
Closed
September 8, 2023, 3:29pm
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.