This article mainly introduces the knowledge points of Boolean objects in javascript, explains the basic usage of Boolean objects, and provides a detailed introduction to the Code. If you are interested, you can refer
Syntax for creating a Boolean
A summary of javascript Learning (Boolean object) and javascriptboolean every day
Syntax for creating a Boolean object:New Boolean (value); // ConstructorBoolean (value); // Conversion FunctionThe parameter value is the value stored by a Boolean
Html dom tutorial 46-JavaScript Boolean object
A Boolean object is a basic data type of JavaScript.
A Boolean object is a Boolean object that packages a Boolean value.1: Boolean object Method
Method
Description
FF
N
IE
to create the syntax for a Boolean object: New Boolean (value); //constructor & nbsp; Boolean (value); //conversion function parameter value The value held by a Boolean object or the value to convert to a Boolean value.
Boolean object
You can understand a Boolean object as an object wrapper that generates logical values.
A boolean (logical) object is used to convert non-logical values to logical values (true or false ).Create a Boolean object
Use the keyword new to
1.JavaScript Boolean (Boolean) objectA Boolean (Boolean) object is used to convert a non-Boolean value to a Boolean value (True or false).1.1 Complete Boolean (Boolean) object reference manual1.2 Creating a Boolean ObjectA Boolean object represents
The first is to understand the operator | | This is done: starting with a meaningful return from the first, or returning the last expression (note that it is not necessarily a Boolean value); && is doing this: starting with the first one,
boolean (logical) objects are used to convert an illogical value to a logical value (TRUE or false) let's introduce the Boolean object initial value of JS below A Boolean (logical) object is used to convert a non logical value to a logical value (
A Boolean (logical) object is used to convert a non logical value to a logical value (TRUE or false).
Create a Boolean object
Use keyword new to define a Boolean object. The following code defines a logical object named Myboolean:
var
The first common method for Java to generate a Boolean object is through the new operator Boolean boolean1 = new Boolean (1 = 1); the second is through the static method valueOfBoolean boolean1 = Boolean. valueOf (1 = 1); the third is the
Example parsing JS Boolean object toString () method and valueOf () method, tostringvalueof
ToString () methodConverts a Boolean value to a string and returns the result.InstanceConvert a Boolean value to a string:
Var bool = new Boolean (1); var
Constructor property
InstanceReturns the function created by the prototype of the MyVar object:
var myvar = new Boolean (1);
Myvar.constructor;
Result output:
function Boolean () {[native code]}
Definitions and usageThe constructor
Boolean objects are simple but useful, but are also listed as a chapter.
The Boolean object is similar to the Boolean encapsulation class in Java. It has two values: true and false.1. Create a Boolean objectVar boo = new Boolean (); // boo is not
1. Understand Boolean objects
Boolean objects are also Boolean objects, indicating logic, true and false.
2. Create a Boolean object
1
3. Boolean attribute | Boolean Method
Boolean objects support the prototype attribute to add or redefine the
Ext. Element class
Element (string/htmlelement element, [Boolean forcenew])Element Object created by ID or DOM Node
Element. Fly (string/htmlelement El, [String named]): ElementA global shared activity element is created by the ID or DOM node
The Boolean object represents two values: & quot; true & quot; or & quot; false & quot ;. Syntax for creating a Boolean object: newBoolean (value); // constructor Boolean (value ); // The value of the conversion function parameter is stored by a
Boolean object
Boolean indicates two values: "true" or "false ".
Syntax for creating a Boolean object:
New Boolean (value); // Constructor
Boolean (value); // Conversion Function
Parameters
The parameter value is the value stored by a Boolean object
Common JavaScript objects and javascript objectsCommon objects, attributes, and usage:(1). Array objectArray objects are used to store multiple values in a single variable.Syntax for creating an Array object:New Array ();New Array (size );New Array (
I roughly classify JavaScript objects as "reference type", "Basic wrapper type" and "Built-in object" three pieces of content according to the contents of the book.Let's take a look at the detailed usage of the basic packaging type first!First, we
Document directory
Ecmascript Basics
Ecmascript Operator
Ecmascript statement
Ecmascript Function
Boolean object
Number object
String object
Array object
Math object
Date object
Regexp object
The javascript interpreter in Flash uses
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.