mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
DOC: stock.getPrice()
: a simple example
Fixes #4184. The hard-coded stock symbol `"FISG"` should be `"FSIG"`.
This commit is contained in:
parent
4cf270138d
commit
01e7ce2a05
8
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
8
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -1104,6 +1104,10 @@ export interface TIX {
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS1
|
||||
* stock.getPrice("FSIG");
|
||||
*
|
||||
* // Choose the first stock symbol from the array of stock symbols. Get the price
|
||||
* // of the corresponding stock.
|
||||
* var sym = stock.getSymbols()[0];
|
||||
* tprint("Stock symbol: " + sym);
|
||||
* tprint("Stock price: " + stock.getPrice(sym));
|
||||
@ -1111,6 +1115,10 @@ export interface TIX {
|
||||
* @example
|
||||
* ```ts
|
||||
* // NS2
|
||||
* ns.stock.getPrice("FSIG");
|
||||
*
|
||||
* // Choose the first stock symbol from the array of stock symbols. Get the price
|
||||
* // of the corresponding stock.
|
||||
* const sym = ns.stock.getSymbols()[0];
|
||||
* ns.tprint("Stock symbol: " + sym);
|
||||
* ns.tprint("Stock price: " + ns.stock.getPrice(sym));
|
||||
|
Loading…
Reference in New Issue
Block a user