+ 3
Below code output is 24 please how it is..ask in challenge in Java script .
Console.log(" 2"+"2"*"2");
2 Respuestas
+ 4
Actually, because of order of operations multiplication is done first.
("2" + "2" *"2") = "2" + "4" = 24 because + does string concatenation.
"22" * 2 = 44.
+ 2
Edit: Makes sense, so the * operator has a higher precedence than the + operator even when the + operator morphs into a string concatenation? Interesting.