I have a value 'Dog'
and an array ['Cat', 'Dog', 'Bird']
.
(我有一个值'Dog'
和一个阵列['Cat', 'Dog', 'Bird']
。)
How do I check if it exists in the array without looping through it?
(如何在没有循环的情况下检查数组中是否存在?)
Is there a simple way of checking if the value exists, nothing more? (是否有一种简单的方法来检查值是否存在,仅此而已?)
ask by user211662 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…