Why Does The Console Log 2? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Why Does The Console Log 2?

In one of the JavaScript challenges I came across the following question: What is the output of this code? var a = 10, b = 20, c = 30; if (c > b > a) { console.log(“1”); } else { console.log(“2”); } It says the correct answer is 2. I’m not sure what I’m missing can anyone explain the answer?

6th Aug 2019, 11:24 PM
Lisa Ryall
Lisa Ryall - avatar
0 Réponse