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