Sie sind auf Seite 1von 4

When you use a primitive sdfasdfadvalue like "hello world" as an object by

referencing a property or method (e.agWhen you use a primitive value like "hello world" as an object by

referencing a property or method (e.g., a.toUpperCase() adsin the pre‐

vious snippet), JS automatically “boxes” the value to its object wrap‐

per counterpart (hidden under the covers).

A string value can be wrapped by a String objasdfect, a number can be

wrapped by a Number object, and a boolean can be wrapped by a

Boolean object. For the most part, you don’t need to worry about or

directly use these object wrapper forms of the values—prefer the

primitive value forms in practically all cases and JavaScript will take

fads

For more informaWhen you use a primitive value like "hello world" as an object by

referencing a property or method (e.g., a.toUpperCase() in the pre‐

vious snippet), JS automatically “boxes” the value to its object wrap‐

per counterpart (hidden under the covers).

A string value can be wrapped by a String object, a number can be

wrapped by a Number object, and a boolean can be wrapped by a

Boolean object. Fofadsfr the most part, you don’t need to worry about or

directly use these object wrapper forms of the values—prefer the

primitive value forms in practically all cases and JavaScript will take

care of the rest for you.

fads

ing,” see Chapter 3 asdfof the Types & Grammar title

of this series. To better understand the prototype

of an object, see Chapter 5 of the this & Object

Prototypes title of this series.

fadfComparing Values
There are two main types of value comparison that ytion on JS natives and “box‐

ing,” see Chapter 3 of the Types & Grammar title

of this series. To better understand the prototype

of an object, see Chapter 5 of the this & Objectasdfasdf

Prototypes title of this series.

Comparing Values

There are two main types of value comparison that y., a.toUpperCase() in the pre‐

When you use a primitive value like "hello world" as an object by

referencing a property or method (e.g., a.toUpperCase() in the pre‐

vious snippet), JS automatically “boxes” the value to its object wrap‐

per counterpart (hidden under the covers).

A string value can be wrapped by a String object, a number can be

wrapped by a Number object, and a boolean can be wrapped by a

Boolean object. For the most part, you don’t need to worry about or

directly use these object wrapper forms of the values—prefer the

primitive value forms in practically all cases and JavaScript will take

care of the rest for you.

For more information on JS natives and “box‐

ing,” see Chapter 3 of the Types & Grammar title

of this series. To better understand the prototype

of an object, see Chapter 5 of the this & Object

Prototypes title of this series.

Comparing Values

There are two main types of value comparison that yWhen you use a primitive value like "hello world"
as an object by

referencing a property or method (e.g., a.toUpperCase() in the pre‐

vious snippet), JS automatically “boxes” the value to its object wrap‐


per counterpart (hidden under the covers).

A string value can be wrapped by a String object, a number can be

wrapped by a Number object, and a boolean can be wrapped by a

Boolean object. For the most part, you don’t need to worry about or

directly use these object wrapper forms of the values—prefer the

primitive value forms in practically all cases and JavaScript will take

care of the rest for you.

For more information on JS natives and “box‐

ing,” see Chapter 3 of the Types & Grammar title

of this series. To better understand the prototype

of an object, see Chapter 5 of the this & Object

Prototypes title of this series.

Comadparing Values

There are two main types of value comparison that yper counterpart (hidden under the covers).

A string value can be wrapped by a String object, a number can be

wrapped by a Number object, aWhen you use a primfasdfitive value like "hello world" as an object by

referencing a property or method (e.g., a.toUpperCase() in the pre‐

vious snippet), JS automaticalsdfly “boxes” the value to its object wrap‐

per counterpart (hidden under the covers).

A string value can be wrapped by a String object, a number can be

wrapped by a Number object, and a boolean can be wrapped by a

Boolean object. For the most part, you don’t need to worry about or

directly use these object wrapper forms of the values—prefer the

primitive value forms in practically all cases and JavaScript will take

care of the rest for you.

For more information on JS natives and “box‐

ing,” see Chapter 3 of the Types & Grammar title

of this series. To better understand the prototype


of an object, see Chapter 5 of the this & Object

Prototypes title of this series.

Comparing Values

There are two main types of value comparison that ynd a boolean can be wrapped by a

Boolean object. For the most part, you don’t need to worry about or

directly use these object wrapper forms of the values—prefer the

primitive value forms in practically all cases and JavaScfaasdript will take

care of the rest for you.

For more information on JS natives and “box‐

ing,” see Chapter 3 of the Types & Grammar title

of this series. To better understand the prototype

of an object, see Chapter 5 of the this & Object

Prototypes title of this series.

Comparing Values

There are two main types of value comparison that y

Das könnte Ihnen auch gefallen