JavaScript Boolean 对象的参考手册
Boolean 对象是 JavaScript 的一种基本数据类型。
Boolean 对象是一个把布尔值打包的布尔对象。
Boolean 对象的方法
FF: Firefox, N: Netscape, IE: Internet Explorer
| 方法 | 描述 | FF | N | IE |
|---|---|---|---|---|
| toSource() | 代表对象的源代码 | 1 | 4 | - |
| toString() | 把逻辑值转换为字符串,并返回结果。 | 1 | 4 | 4 |
| valueOf() | 返回 Boolean 对象的原始值 | 1 | 4 | 4 |
Boolean 对象的属性
FF: Firefox, N: Netscape, IE: Internet Explorer
| 属性 | 描述 | FF | N | IE |
|---|---|---|---|---|
| constructor | 对创建此对象的函数的一个引用 | 1 | 2 | 4 |
| prototype | 允许您向对象添加属性和方法 | 1 | 2 | 4 |