Why the things are not changing [Solved] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
7th Jul 2020, 10:16 AM
Abhishek Singh
Abhishek Singh - avatar
2 Answers
+ 5
I see that you have done comparison in the form of a < b < c. In JavaScript, you need to do a < b && b < c because a < b will return either true or false, and then you’re basically comparing true or false with a number. So, for the morning if statement, you should put: if(3 < hours && hours < 12)
7th Jul 2020, 10:18 AM
Rowsej
Rowsej - avatar
+ 1
Rowsej Thank you
7th Jul 2020, 10:55 AM
Abhishek Singh
Abhishek Singh - avatar