是否有更简单的方法来确定变量是否等于一系列值,例如:
if x === 5 || 6
而不是像以下那样钝的东西:
if x === 5 || x === 6
?
javascript comparison
comparison ×1
javascript ×1