【文件属性】:
文件名称:array-each:比 Array.prototype.forEach 好看
文件大小:8KB
文件格式:ZIP
更新时间:2021-07-18 06:35:23
JavaScript
每个数组
比 Array.prototype.forEach 好看
特征
使用 this 来引用数组而不是传递的参数
易碎!
例子
[1,2,3,4,5].each(function(value, index, exit) {
// this[index] === value;
console.log(value);
if (value === 2) exit();
});
// Will print:
// 1
// 2
【文件预览】:
array-each-master
----README.md(363B)
----LICENSE(18KB)
----array-each.js(636B)