Theme Layout

Boxed or Wide or Framed

Wide

Theme Translation

Display Featured Slider

Featured Slider Styles

Display Grid Slider

yes

Grid Slider Styles

Display Trending Posts

Display Author Bio

Display Instagram Footer

off

Dark or Light Style

Light

Blog Archive

Powered by Blogger.

Friday, February 17, 2017

[JavaScript] Booleans


# JavaScript Booleans


● Boolean Values

Very often, in programming, I need a date tpe that caon only have one of two values, like
  • YES / NO
  • ON / OFF
  • TRUE / FALSE
For this, JSP has a Boolean data type. It can only take the values True or False

●The Boolean() Function

I use the Boolean() function to find out if an expression is true.

● Booleans Can be Objects

Normally JSP booleans are primitive values created from literals: var x = false
But booleans can also be defined as objects with the keyword new: var y = new Boolean(false)


QuickEdit
Unknown
0 Comments
Share This Post :

You Might Also Like

No comments:

Post a Comment

Follow @SunriseSunsetBlog