Created
September 24, 2018 06:07
-
-
Save harrisonmalone/786b242d621ae27fd6355a803e187cde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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