--- 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 ---
Boolean.prototype
속성은 {{jsxref("Boolean")}} 생성자의 프로토타입을 나타냅니다.
{{jsxref("Boolean")}} 인스턴스는 Boolean.prototype
을 상속받습니다. 생성자의 프로토타입 객체를 사용해 모든 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")}}