जावास्क्रिप्ट बूलियन संदर्भ
जावास्क्रिप्ट बूलियन
जावास्क्रिप्ट बूलियन में दो में से एक मान हो सकता है: true
या
false
.
बूलियन () फ़ंक्शन
आप यह Boolean()
पता लगाने के लिए फ़ंक्शन का उपयोग कर सकते हैं कि कोई व्यंजक सत्य है या नहीं:
उदाहरण
Boolean(10 > 9)
या इससे भी आसान:
उदाहरण
(10 > 9)
10 > 9
बूलियन के बारे में एक ट्यूटोरियल के लिए, हमारा जावास्क्रिप्ट बूलियन ट्यूटोरियल पढ़ें ।
जावास्क्रिप्ट बूलियन तरीके
Method | Description |
---|---|
toString() | Converts a boolean value to a string, and returns the result |
valueOf() | Returns the primitive value of a boolean |
जावास्क्रिप्ट बूलियन गुण
Property | Description |
---|---|
constructor | Returns the function that created JavaScript's Boolean prototype |
prototype | Allows you to add properties and methods to the Boolean prototype |