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? 是否有一种简单的方法来检查值是否存在,仅此而已? oop