Difference between revisions of "Indexes"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>indexes</c> Returns the keys of a dictionary, or the non-negative indexes for a string or list. See also hasIndex === Arguments === {| class="wikitable" |- ! Paramet...")
 
m (fixed typo)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<c>indexes</c> Returns the keys of a dictionary, or the non-negative indexes
+
<c>indexes</c> returns the keys of a dictionary, or the non-negative indexes
 
for a string or list.
 
for a string or list.
  
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]]

Latest revision as of 13:14, 19 June 2020

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

See also hasIndex

Arguments

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

Example

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