Boolean

2 minutes
Share the link to this page
Copied
  Completed
The Boolean object is an object wrapper for a boolean value.

Transcript

Hello, in this JavaScript video I am going to show you the Boolean object. So this is a really easy one. Normally you create a Boolean Boolean variable like this, where the length is a model. We have all one equals false. That's how you create you know, regular Boolean is really an object of Tony boon. obj OBJ object equals new but you need the unique keyword new and then the actual object you're creating initial value so let's console dot log.

Let's log out Baldwin. Let's log out. Pool OBJ. Let's see what we get. A false for the vol one class only contained whereas for the Boolean object it no it pretty Foursquare is a little more to it. Because the way objects work, they have properties.

And they have functionality that goes beyond this, the data itself. And you can use that to manipulate it all for the bool object.to string is one of the message. Before we load that, we get false, I need a slightly different color, this is a string compared to the other one, you can get that value for below that actually gets the true value. You know, everything's the same color now and that you know the boolean value. Same is true or false. So that's a Boolean object with a few different ways to actually create one, you could put false and then put zero put no and obviously positive.

It's To the opposite, what I'm actually going to do is provide a really great link from the MDM, which is Mozilla Developer Network. And that has a huge amount of resources, not just for Boolean objects for a variety of other features as well. And check that out. Experiment with the different ways of creating Boolean objects and Anzhi. MDN is one of the best resources if you are a web developer, or just interested in JavaScript. That's it.

Thanks for watching any questions, feel free to pop me a message and I look forward to seeing you in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.