Skip to content

Latest commit

 

History

History
78 lines (37 loc) · 935 Bytes

File metadata and controls

78 lines (37 loc) · 935 Bytes

Home > bitburner > Format > money

Format.money() method

Format a number as an amount of money.

Signature:

money(n: number, exponential?: boolean): string;

Parameters

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.

Remarks

RAM cost: 0 GB

Converts a number into a numeric string, using the user-defined currency prefix/suffix.