用函数调用替换内联代码

refactorgram

  let appliesToMass = false;
  for(const s of states) {
    if (s === "MA") appliesToMass = true;
  }

image/svg+xml

appliesToMass = states.includes("MA");