Files
number_zj/20220330_Vote/Ewide.Web.Entry/wwwroot/lib/xe-utils/arrayEach.js
毛财君 197b38ca6f 1
2023-07-06 17:37:33 +08:00

14 lines
307 B
JavaScript

function arrayEach (list, iterate, context) {
if (list) {
if (list.forEach) {
list.forEach(iterate, context)
} else {
for (var index = 0, len = list.length; index < len; index++) {
iterate.call(context, list[index], index, list)
}
}
}
}
module.exports = arrayEach