Hacker News new | past | comments | ask | show | jobs | submit login

I thought about how I'd do this in JS, and it's paradoxically more compact and less confusing without dedicated syntax:

  if (leaders.some(i => i == "Yang")) {
      alert("Yang is a leader!");
  } else {
      alert("Not found Yang!");
  }



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: