Booleans | SoloLearn: Learn to code for FREE!

-1

Booleans

Just started JavaScript and I need to know how can I use Boolean

12/26/2019 11:49:24 PM

CodeShow

2 Answers

New Answer

+1

To use booleans just write true or false. Like so: if (true) { console.log('first if'); } else if (false) { // this won't run console.log('second if'); } else { console.log('else'); }

0

this type of data you can use when compared to what either. for example: a > 5 ?