In this code I am trying to remove the last vowel in the word. Once I ran the code, I received an argument error stating "comparison of Fixnum with Array failed(ArgumentError). Please help!
VOWELS = %w( a e i o u)
def hipsterfy(string)
new_string = string.split('')
reversed_string = new_string.reverse
i = 0
while i <= reversed_string
if VOWELS.include?[i]
reversed_string[i] = ('')
i += 1
end
reversed_string
end
reversed_string.reverse
end