Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Making Decisions with Conditional Statements Improving the Random Number Guessing Game

Is there a better way of learning Boolean values? or Can i go further with JavaScript without properly understanding?

I was doing just fine before boolean values, I am able to read and write the codes but i don't understand What's going on?

So can i go further with Java script without actually understanding the boolean

3 Answers

Kieran Barker
Kieran Barker
15,028 Points

I’d say boolean values are vital, because they’re used in all kinds of control structures like loops and conditional statements. What don’t you understand about them? All they are is true/false values and that’s it :-)


Sundar Maharjan
Sundar Maharjan
6,740 Points

Thank you Kieran Barker.

What exactly is giving you a problem? If you tell us exactly, maybe we could help you understand.

Jason Gallant
Jason Gallant
8,437 Points

Like Strings (lists/arrays of characters), Integers (whole numbers), and floating points (decimal numbers), booleans are just another type of value that the interpreter recognizes. They can only be either true, or false. Since they can only hold the value true, or the value false, you can use them directly in conditional tests:

var isTrue = true; if (isTrue) { CODE; }

The CODE above would run because isTrue is a variable to which you've assigned the value of true.

dunno if that helps?