基本用途
// array
var arr = [
'one',
'two',
'three',
'four'
];
$.each(arr, function (index, value) {
console.log(value);
// Will stop running after "three"
return (value !== 'three');
});
// Outputs: one two three
// array
var arr = [
'one',
'two',
'three',
'four'
];
$.each(arr, function (index, value) {
console.log(value);
// Will stop running after "three"
return (value !== 'three');
});
// Outputs: one two three