An open API service indexing awesome lists of open source software.

https://github.com/fed135/array-each

Better-looking than Array.prototype.forEach
https://github.com/fed135/array-each

Last synced: 11 months ago
JSON representation

Better-looking than Array.prototype.forEach

Awesome Lists containing this project

README

          

# array-each

Better-looking than Array.prototype.forEach

## Features

- Uses this to refer to array instead of passed argument
- Breakable!

## Example

[1,2,3,4,5].each(function(value, index, exit) {
// this[index] === value;
console.log(value);
if (value === 2) exit();
});

// Will print:
// 1
// 2