Home > bitburner > Format > money
Format a number as an amount of money.
Signature:
money(n: number, exponential?: boolean): string;|
Parameter |
Type |
Description |
|---|---|---|
|
n |
number |
Amount of money to format. |
|
exponential |
boolean |
(Optional) Whether or not to use exponential form for small numbers (between 0 and 0.001). Defaults to false. |
Returns:
string
Formatted amount of money.
RAM cost: 0 GB
Converts a number into a numeric string, using the user-defined currency prefix/suffix.