Home > front end >  Request bosses explain down the js code to me
Request bosses explain down the js code to me

Time:10-06

The function every (collection, pre) {
Var arr=collection. Every (function (check) {
Return the check (pre);
});
Return arr.
}
Var arr=collection here. Every (function (check) {
Return the check (pre);
}); To this, I really didn't understand, request bosses give directions

CodePudding user response:

Traverse a collection array of each element in the array to invoke a function (check) {} function (check for current traversal of array element), if all functions return returns true, the arr is true, otherwise the arr to false,

CodePudding user response:

Can have a look at the array every function of the document
  • Related