JavaScript Boole Referansı
JavaScript Booleanları
JavaScript boolean'ları iki değerden birine sahip olabilir: true
veya
false
.
Boolean() İşlevi
Boolean()
Bir ifadenin doğru olup olmadığını öğrenmek için işlevi kullanabilirsiniz :
Örnek
Boolean(10 > 9)
Veya daha da kolay:
Örnek
(10 > 9)
10 > 9
Booleanlarla ilgili bir eğitim için JavaScript Boole Eğitimimizi okuyun .
JavaScript Boole Yöntemleri
Method | Description |
---|---|
toString() | Converts a boolean value to a string, and returns the result |
valueOf() | Returns the primitive value of a boolean |
JavaScript Boole Özellikleri
Property | Description |
---|---|
constructor | Returns the function that created JavaScript's Boolean prototype |
prototype | Allows you to add properties and methods to the Boolean prototype |