Created
March 19, 2015 18:32
-
-
Save NevadaKiran/68e851d16e4cfc0180a6 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
letters = "a" | |
vowels = ["a", "e", "i", "o", "u"] | |
# Loop through each letter and print whether it is a vowel or consonant | |
# letters.each_with_index do |letter, index| | |
# if letter == "a" || letter == "e" || letter == "i" || letter == "o" || letter == "u" | |
# puts "vowel at index #{index}" | |
# else | |
# puts "consonant at index #{index}" | |
# end | |
# end | |
# Loop each letter and print whether it is a vowel or a consonant. | |
letters.each_with_index do |letter, index| | |
puts vowels |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment