Tile - Array - Index Of – Ylands
Jump to navigation
Jump to search
m (YlandsClassyBot moved page Ylands Tile - Array index of to Ylands:Tile - Array - Index Of: New Structure) |
No edit summary |
||
Line 1: | Line 1: | ||
<!--- | |||
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE. | |||
--> | |||
== Index Of(Array, Object) == | |||
=Notes= | [[File:YlandsTile-192.png]] | ||
*Index numbers always start from 0, e.g: Array of | |||
<pre>indexOf(object: T): number;</pre> | |||
=== Parameters === | |||
==== object ==== | |||
=== Returns === | |||
'''number''' Returns '''position''' (index) of the specified '''object'''. If the item is present more than once, instruction returns the position of the '''first occurrence'''. Returns '''-1''' if the object is '''not found'''. | |||
=== Description === | |||
Returns '''position''' (index) of the specified '''object'''. If the item is present more than once, instruction returns the position of the '''first occurrence'''. Returns '''-1''' if the object is '''not found'''. | |||
=== Notes === | |||
* Index numbers always start from 0, e.g: Array of '''length''' 3 has indexes 0, 1 and 2. | |||
Line 13: | Line 29: | ||
[[Category: Instructions]] | [[Category: Instructions]] | ||
Revision as of 08:53, 8 July 2021
Index Of(Array, Object)
indexOf(object: T): number;
Parameters
object
Returns
number Returns position (index) of the specified object. If the item is present more than once, instruction returns the position of the first occurrence. Returns -1 if the object is not found.
Description
Returns position (index) of the specified object. If the item is present more than once, instruction returns the position of the first occurrence. Returns -1 if the object is not found.
Notes
- Index numbers always start from 0, e.g: Array of length 3 has indexes 0, 1 and 2.