Boolean variables

Hey guys. I’m going through Javascript course and I’m having hard time understanding. Especialy this peace in the ss.

So if I understand correctly val here is 10. And obviously the test is asking for “< 25” and “<55” inputs. Yet if I try to input “<24” and “<54” it does not work. Can some one explain me how does 10<24 and 10<54 not work? I’m learning Javascript from scratch, can someone please tell me what am I missing here? I’m starting to get frustrated, it makes no sense for me…

can you give the link to the challenge?

This challenge is only asking you the use the < operator and if you go down the website you should see this.

testLessThan(0) should return "Under 25"

testLessThan(24) should return "Under 25"
Passed

testLessThan(25) should return "Under 55"
Passed

testLessThan(54) should return "Under 55"
Passed

testLessThan(55) should return "55 or Over"
Passed

testLessThan(99) should return "55 or Over"
Passed

You should use the < operator at least twice

Which means that any you do need to pass those test too, in this challange there is no for you add val < 24 because the test is expecting to see val < 25 I now is confusing sometime but you get use to it.

1 Like

Hi @learn.code.jp!

What error message are you getting when you run this code?

In your screenshot, I don’t see any error messages.

Also, please try to avoid screenshots when you need help with challenges. It is best to use the ask for help button instead.

1 Like

Hi @jwilkins.oboe.
Good point I’ll keep it in mind, my bad.
@Jose_Elias_Sanchez already gave me the answer to this issue. Thank you both.