-
Notifications
You must be signed in to change notification settings - Fork 0
API Boolean
Liu.Yandong.Hanks edited this page Aug 21, 2026
·
3 revisions
Boolean conversion plus the true and false constants.
Boolean converts values using AuroraScript truthiness. It is not a mutable wrapper object; the result is always the primitive Boolean true or false.
Boolean is callable, so Boolean(value) converts a value directly.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
any |
No | Value to convert. |
Returns
boolean — the truthiness of the value.
Example
return Boolean("text"); // true| Constant | Type | Description |
|---|---|---|
Boolean.true |
boolean |
Boolean true constant. |
Boolean.false |
boolean |
Boolean false constant. |
Example
return Boolean.true && !Boolean.false; // trueParameters
| Name | Type | Required | Description |
|---|---|---|---|
value |
any |
Yes | Value to convert. |
Returns
boolean — the truthiness of the value.
Example
return Boolean.valueOf(0); // falseParameters
None.
Returns
string — "true" or "false".
Example
return Boolean(true).toString(); // "true"AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License