JavaScript Boolean (Boolean) object related knowledge and usage
May 07, 2018 am 10:21 AMBoolean (Boolean) objects are used to convert non-Boolean values into Boolean values (true or false). This article will explain some properties.
Create a Boolean object
The Boolean object represents two values: "true" or "false"
The following code defines a Boolean object named myBoolean:
var myBoolean=new Boolean();
If the Boolean object has no initial value or its value is:
0 -0 null "" false undefined NaN
Then the value of the object is false. Otherwise, its value is true (even when the variable value is the string "false")!
This article briefly explains the related properties and creation of Boolean. For more learning materials, please pay attention to the php Chinese website.
Related recommendations:
JavaScript typeof, null, and undefined related knowledge
JavaScript Date (date) related knowledge And usage
#About the usage of JavaScript Break and Continue statements
The above is the detailed content of JavaScript Boolean (Boolean) object related knowledge and usage. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to implement an online speech recognition system using WebSocket and JavaScript

Recommended: Excellent JS open source face detection and recognition project

Essential tools for stock analysis: Learn the steps to draw candle charts with PHP and JS

WebSocket and JavaScript: key technologies for implementing real-time monitoring systems

PHP and JS Development Tips: Master the Method of Drawing Stock Candle Charts

How to implement an online reservation system using WebSocket and JavaScript

How to use JavaScript and WebSocket to implement a real-time online ordering system

JavaScript and WebSocket: Building an efficient real-time weather forecasting system
