+ 2

Why does 10 > 9 > 8 prints false ?

8th Feb 2020, 8:06 PM
Marina Khamis
Marina Khamis  - avatar
4 Respuestas
+ 7
This is how the sequence goes; 10>9>8 is first evaluated as 10>9 which outputs "true" The second sequence is executed as true>8 this gives false because true is same as or equal to 1, thus evaluated as 1>8, and this will finally produce false, since 1is not greater than but less than 8. Happy coding 😉 Keep coding 👌
8th Feb 2020, 8:37 PM
Alfred Juma
Alfred Juma - avatar
+ 4
In Python it would be evaluated as True. :)
8th Feb 2020, 8:41 PM
HonFu
HonFu - avatar
+ 2
Because 10>9(true or 1) But 1 is not greater than that means 10>9>8 is false or 0
9th Feb 2020, 9:03 AM
Mehak Jain
0
10>9(true or 1 ) means 10>9>8 true>8 1>8 which is false
10th Feb 2020, 6:06 PM
Gagan Verma
Gagan Verma - avatar