valueOf

 

Summary

Returns the primitive value of a Boolean object.

Method of Boolean
Implemented in JavaScript 1.1
ECMAScript Edition ECMAScript 1st Edition

Syntax

bool.valueOf()

Parameters

None.

Description

The valueOf method of Boolean returns the primitive value of a Boolean object or literal Boolean as a Boolean data type.

This method is usually called internally by JavaScript and not explicitly in code.

Examples

Example: Using valueOf

x = new Boolean();
myVar = x.valueOf()      //assigns false to myVar

See Also

Object.valueOf

Tags (0)

Edit tags
  • No tags

Attachments (0)

 

Attach file