Skip to content

Instantly share code, notes, and snippets.

@upangka
Created January 2, 2020 01:58
Show Gist options
  • Save upangka/99efdfe53101f9f9473ea7ecc98c1682 to your computer and use it in GitHub Desktop.
Save upangka/99efdfe53101f9f9473ea7ecc98c1682 to your computer and use it in GitHub Desktop.
javascript 判断元素是否满足条件

link

if (index === 0 || index === 2) 
if ([0, 2].includes(index)) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment