Difference between revisions of "Table.foreachi"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")  | 
				m (Text replacement - "</source>" to "</syntaxhighlight>")  | 
				||
| Line 7: | Line 7: | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
table.foreachi(t,function)  | table.foreachi(t,function)  | ||
| − | </  | + | </syntaxhighlight>  | 
=== Parameters ===  | === Parameters ===  | ||
Latest revision as of 14:33, 13 July 2023
Available since: Gideros 2022.3
Class: table
Description
Iterates over the provided table, passing the index and value of each iteration over to the provided function.
table.foreachi(t,function)
Parameters
t: (table) the table to be iterated over
function: (function) the function that will be used for the iteration. This function will receive 2 arguments for each iteration, where the 1st argument is the index, and the 2nd argument is the value