UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

70 lines (33 loc) 989 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [IterationMap](./server.iterationmap.md) &gt; [forEach](./server.iterationmap.foreach.md) ## IterationMap.forEach() method Executes a provided function once for each key-value pair. **Signature:** ```typescript forEach(callbackfn: (value: V, key: K, map: IterationMap<K, V>) => void, thisArg?: any): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> callbackfn </td><td> (value: V, key: K, map: [IterationMap](./server.iterationmap.md)<!-- -->&lt;K, V&gt;) =&gt; void </td><td> Function to execute for each element. </td></tr> <tr><td> thisArg </td><td> any </td><td> _(Optional)_ Value to use as this when executing callback. </td></tr> </tbody></table> **Returns:** void