[: currentTime | date:'mm:ss' :] [: timeLeft | date:'mm:ss' :]

示例参考

var a = [2, 4, 6, 8];

function each(arr, callback) {
  for (var i = 0; i < arr.length; i++) {
    var item = arr[i];
    callback(item);
  }
}

each(a, function (item) {
  if (item < 5) {
    console.log(item);
  }
});

each(a, equal2);

function equal2(item) {
  if (item == 2) {
    console.log(item);
  }
}
登录后评论