Comparisons


#1

Hi I am learning comparisons:

I don't know how to fix it.
Thank you!

console.log(25>20);// 25 > 20 evaluates to true, so true is printed.
console.log(0===0);
console.log(2,10);
console.log(8*2);
"Fabi".length


#2

The problem is here. can you see it?
First of all, comma is not a comparison operator.
You can switch the comma with this operator: < and now you have console.log(2<10)

And the fourth console.log is falsh and you need it true.
so you can switch the multiplication operator with the not equel operator that looks like this: !== and now you have:
console.log (8!==2) that evaluates to true


#3

Thank you so much for your help!
Fabi


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.