--- title: Boolean.prototype slug: conflicting/Web/JavaScript/Reference/Global_Objects/Boolean tags: - Boolean - JavaScript - Property - Prototype translation_of: Web/JavaScript/Reference/Global_Objects/Boolean translation_of_original: Web/JavaScript/Reference/Global_Objects/Boolean/prototype original_slug: Web/JavaScript/Reference/Global_Objects/Boolean/prototype ---
{{JSRef}}
Boolean.prototype
属性表示{{jsxref("Boolean")}} 构造函数的原型。
{{jsxref("Boolean")}}实例继承自Boolean.prototype
。你可以使用构造函数的原型对象向所有{{jsxref("Boolean")}}实例添加属性或方法。
Boolean.prototype.constructor
"true"
或 "false"
。覆盖了 {{jsxref("Object.prototype.toString()")}} 方法。Specification | Status | Comment |
---|---|---|
{{SpecName('ES1')}} | {{Spec2('ES1')}} | Initial definition. Implemented in JavaScript 1.0. |
{{SpecName('ES5.1', '#sec-15.6.3.1', 'Boolean.prototype')}} | {{Spec2('ES5.1')}} | |
{{SpecName('ES6', '#sec-boolean.prototype', 'Boolean.prototype')}} | {{Spec2('ES6')}} | |
{{SpecName('ESDraft', '#sec-boolean.prototype', 'Boolean.prototype')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.Boolean.prototype")}}