# foreach **Repository Path**: mirrors_fis-components/foreach ## Basic Information - **Project Name**: foreach - **Description**: Fork from https://github.com/manuelstofer/foreach - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-01-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # foreach Iterate over the key value pairs of either an array-like object or a dictionary like object. [![browser support][1]][2] ## API ### foreach(object, function, [context]) ```js var each = require('foreach'); each([1,2,3], function (value, key, array) { // value === 1, 2, 3 // key === 0, 1, 2 // array === [1, 2, 3] }); each({0:1,1:2,2:3}, function (value, key, object) { // value === 1, 2, 3 // key === 0, 1, 2 // object === {0:1,1:2,2:3} }); ``` [1]: https://ci.testling.com/manuelstofer/foreach.png [2]: https://ci.testling.com/manuelstofer/foreach