August 1999
Intermediate to advanced
1488 pages
72h 53m
English
Boolean.prototype.property Boolean.prototype.method
The prototype property allows you to add new properties and methods to the Boolean object that can be used throughout your code.
In Listing 6.64, the prototype property is used to create a new method, called letter(), which can be used by all Boolean objects. The letter() method uses the letterBoolean() function to return T or F based on the status of the object.
<html> <script language="JavaScript"> <!–– Hide //This function returns the string "T" or "F" based on the value stored in the //Boolean ... |
Read now
Unlock full access