exit
exit
Function
Sets the exit value and ends the current script execution.
Syntax
exit(value)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| value | Any | No | Empty | Exit value. |
Return value
| Type | Description |
|---|---|
| Any/Empty | Return and log the exit value. |
Example
exit('done') // Output: done
Notes
- The value passed in is written to the output; if the exit value is
empty, it will be displayed asempty.