+ 2

Where Can I use Booleans in JavaScript?

2nd Dec 2020, 7:15 AM
Siriki Lohit
3 Answers
+ 4
Boolean means True or False. It is used in cases where you want to check something if its true or false. Like, if(x>0) ... Here, x>0 returns a boolean, i.e., either True or False, depending on value of x. So boolean plays a very important role in programming, not just for javascript, but all languages out there. To sum up, booleans are used for checking if a condition is satisfied or not
2nd Dec 2020, 7:32 AM
Charitra
Charitra - avatar
+ 2
Thanks
2nd Dec 2020, 7:40 AM
Siriki Lohit
0
Siriki Lohit you are welcome
2nd Dec 2020, 8:27 AM
Charitra
Charitra - avatar