JavaScript Bool...LOGIN

JavaScript Boolean object

JavaScript Boolean (Boolean) Object

TBoolean (Boolean) object is used to convert non-Boolean values ​​to Boolean values ​​(true or false).

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-0null""falseundefinedNaN

Then the object's The value is false. Otherwise, its value is true (even when the argument is the string "false")!


Next Section
1
2
<!DOCTYPE html>
<html>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
submitReset Code
ChapterCourseware