Difference between revisions of "Indexes"

From MiniScript Wiki
Jump to navigation Jump to search
Line 15: Line 15:
 
== Example ==
 
== Example ==
  
<ms>Example: "foo".indexes // returns [0, 1, 2]</ms>
+
<ms>"foo".indexes // returns [0, 1, 2]</ms>
  
 
[[Category:Intrinsic Functions]]
 
[[Category:Intrinsic Functions]]

Revision as of 15:22, 17 March 2020

indexes returns the keys of a dictionary, or the non-negative indexes for a string or list.

See also hashIndex

Arguments

Parameter Name Default Value Meaning
self string, list, or map object to geet the indexes of

Example

"foo".indexes	// returns [0, 1, 2]