-
Notifications
You must be signed in to change notification settings - Fork 0
API console
Liu.Yandong.Hanks edited this page Aug 21, 2026
·
3 revisions
Console logging and named timing API.
console writes script diagnostics to the host-configured standard output and standard error streams, and provides named timers for coarse measurements. It is a static object with no constructor.
Tip
Console output goes through the host, so it is comparatively expensive. Keep it out of hot execution paths and use it for diagnostics and development.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
values |
any |
No | Zero or more values to write, passed as variadic arguments. |
Returns
null.
Behavior
Writes the values to standard output.
Example
console.log("loaded", 3);
return 0;Parameters
| Name | Type | Required | Description |
|---|---|---|---|
values |
any |
No | Zero or more values to write, passed as variadic arguments. |
Returns
null.
Behavior
Writes the values to standard error.
Example
console.error("invalid input", 42);
return 0;Parameters
| Name | Type | Required | Description |
|---|---|---|---|
label |
string |
Yes | Timer name. Use the same name with console.timeEnd. |
Returns
null.
Behavior
Starts a named timer.
Example
console.time("build");
return 0;Parameters
| Name | Type | Required | Description |
|---|---|---|---|
label |
string |
Yes | Name of the timer to stop. |
Returns
null.
Behavior
Stops the named timer and writes the elapsed time.
Example
console.time("work");
var value = 20 + 22;
console.timeEnd("work");
return value; // 42AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License