Eric Foster d5378345de connection between front end and database | 6 lat temu | |
---|---|---|
.. | ||
.npmignore | 6 lat temu | |
LICENSE | 6 lat temu | |
Makefile | 6 lat temu | |
Readme.md | 6 lat temu | |
component.json | 6 lat temu | |
index.js | 6 lat temu | |
package.json | 6 lat temu | |
test.js | 6 lat temu |
Iterate over the key value pairs of either an array-like object or a dictionary like object.
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}
});