mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-25 15:42:28 +01:00
19 lines
348 B
ReStructuredText
19 lines
348 B
ReStructuredText
atExit() Netscript Function
|
|
============================
|
|
|
|
.. js:function:: atExit(f)
|
|
|
|
:RAM cost: 0 GB
|
|
:param function f: function to call when the script dies.
|
|
|
|
Runs when the script dies.
|
|
|
|
Example:
|
|
|
|
.. code-block:: javascript
|
|
|
|
function onDeath() {
|
|
console.log('I died!!!')
|
|
}
|
|
atExit(onDeath);
|