table.ForEach

From Garry's Mod
Jump to: navigation, search
 table.ForEach( )

Description

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

You should use pairs() instead.
Iterates over a table and calls the given function for each key and value found. Unlike table.foreach, this ignores the value returned by the function.

Arguments

table tab

Table to iterate over.

Arguments

function callback

Function to call for every key-value pair. Arguments passed are:

Personal tools
Navigation