📜  cursor.forEach() 中的“继续” - Javascript 代码示例

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

代码示例1
elementsCollection.forEach(function(element){
  if (!element.shouldBeProcessed)
    return; // stop processing this iteration

  // This part will be avoided if not neccessary
  doSomeLengthyOperation();
});