I am new to ruby and trying to create a method that takes a string and returns an array with each letter as their own index in an array.
def validate_word(word)
w=[]
word.downcase!
w << word.split(//)
return w
end
validate_word("abcABC")
=> [["a", "b", "c", "a", "b", "c"]]
I would like it to return
=>["a", "b", "c", "a", "b", "c"]
Thank you for looking at my code.