Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created September 24, 2018 06:07
Show Gist options
  • Select an option

  • Save harrisonmalone/786b242d621ae27fd6355a803e187cde to your computer and use it in GitHub Desktop.

Select an option

Save harrisonmalone/786b242d621ae27fd6355a803e187cde to your computer and use it in GitHub Desktop.
require 'pry'
def is_string_in_array?(array, string)
array.each do |word|
if word == string
return true
end
end
return false
end
p is_string_in_array?(["hello", "there"],"there")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment