projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
0e045868676a60b525aa6fe43f3848e9cc562a04
[platform/framework/web/crosswalk-tizen.git]
/
1
define(function () {
2
3
/**
4
* Array forEach
5
*/
6
function forEach(arr, callback, thisObj) {
7
if (arr == null) {
8
return;
9
}
10
var i = -1,
11
len = arr.length;
12
while (++i < len) {
13
// we iterate over sparse items since there is no way to make it
14
// work properly on IE 7-8. see #64
15
if ( callback.call(thisObj, arr[i], i, arr) === false ) {
16
break;
17
}
18
}
19
}
20
21
return forEach;
22
23
});