📜  javascript 地图回调函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:25.384000             🧑  作者: Mango

代码示例1
function doOpSingle2(arrelem,flag)
{
 // do something with one array element
}

var A = ["one", "two", "three", "four"];
var theFlag = util.getMask(); // call external function
var y = A.map(doOpSingle2(theFlag)); // this does not work!