Why Does The Console Log 2? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta