JavaScript Boolean အကိုးအကား
JavaScript Booleans
JavaScript boolean တွင် တန်ဖိုးနှစ်ခုမှ တစ်ခုရှိနိုင်သည်- true
သို့မဟုတ်
false
.
Boolean() လုပ်ဆောင်ချက်
Boolean()
အသုံးအနှုန်းတစ်ခု မှန်သလားဆိုတာ ရှာဖွေရန် လုပ်ဆောင်ချက်ကို သင်သုံးနိုင်သည် -
ဥပမာ
Boolean(10 > 9)
သို့မဟုတ် ပိုလွယ်သည်-
ဥပမာ
(10 > 9)
10 > 9
boolean အကြောင်း သင်ခန်းစာအတွက်၊ ကျွန်ုပ်တို့၏ JavaScript Boolean Tutorial ကို ဖတ်ရှုပါ ။
JavaScript Boolean နည်းလမ်းများ
Method | Description |
---|---|
toString() | Converts a boolean value to a string, and returns the result |
valueOf() | Returns the primitive value of a boolean |
JavaScript Boolean Properties
Property | Description |
---|---|
constructor | Returns the function that created JavaScript's Boolean prototype |
prototype | Allows you to add properties and methods to the Boolean prototype |