Skip to content

Instantly share code, notes, and snippets.

@martinsson
Created May 1, 2018 21:59
Show Gist options
  • Save martinsson/df2155e12aa7bffe951b1e00e1822fe6 to your computer and use it in GitHub Desktop.
Save martinsson/df2155e12aa7bffe951b1e00e1822fe6 to your computer and use it in GitHub Desktop.
Bug generator: Use of indices
let isCat = animal => animal.type === 'cat'
let foundAnimal = animals.some(isCat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment