How to check if a value exists in an array in Ruby

You’re looking for include?:

>> ['Cat', 'Dog', 'Bird'].include? 'Dog'
=> true

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)