Java Script and Algorithyms- Basic Structures

I’m not sure what’s wrong with my code I keep getting 1 apostrophe, there shouldn’t be any apostrophes just what’s written . The output i get is : [ ‘pizza’, 7 ] :

Your code so far


// Only change code below this line
var myArray = ["pizza", 7];
console.log(myArray);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36.

Challenge: Store Multiple Values in one Variable using JavaScript Arrays

Link to the challenge:

Thanks in advance,
Samee

The code you pasted above is working for me. Are you passing the tests?

As for the console.log output, the console is just converting the double quotes to single quotes, but they are exactly the same thing (a string can be defined using either double or single quotes). So this is not an indicator that there is something wrong.

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