0

What is the output of this code?

var foods = [“pizza”, “sandwich”, “soup”]; console.log(foods.length) ...i know it’s 3..so why does it say the answer is 5?

29th Oct 2018, 10:40 PM
Tiggatee
4 odpowiedzi
+ 5
/*there was a problem with your quotation marks*/ var foods = ["pizza","sandwich","soup"]; console.log(foods.length);
29th Oct 2018, 10:47 PM
D_Stark
D_Stark - avatar
0
that shouldnt matter
29th Oct 2018, 11:02 PM
Tiggatee
0
Where is the link to your code in the code playground?
29th Oct 2018, 11:30 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
Tiggatee Why shouldn't it matter? It's an invalid quoting character.
29th Oct 2018, 11:42 PM
Emerson Prado
Emerson Prado - avatar