用 Break 替换控制标志

refactorgram

for (const p of people) {
  if (! found) {
    if ( p === "Don") {
      sendAlert();
      found = true;
    }

image/svg+xml

for (const p of people) {
  if ( p === "Don") {
    sendAlert();
    break;
  }

别名 移除控制标志