Hacker News new | ask | show | jobs
by jakelazaroff 1204 days ago
There are concepts like filtering that let you operate on booleans without branching:

   const published = posts.filter(post => !post.draft);