13 lines
413 B
Text
13 lines
413 B
Text
----------------------------------------
|
|
-- One of the five native iterative methods defined in ECMAScript 5
|
|
-- @param {list} tList
|
|
-- @param {symbol} cbFunc
|
|
-- @param {object} [cbObj=_movie]
|
|
----------------------------------------
|
|
on forEach (tList, cbFunc, cbObj)
|
|
if voidP(cbObj) then cbObj = _movie
|
|
cnt = tList.count
|
|
repeat with i = 1 to cnt
|
|
call(cbFunc, cbObj, tList[i], i, tList)
|
|
end repeat
|
|
end
|