s1 = "this is a typing test" s2 = gets.chomp s1s = s1.split(//) s2s = s2.split(//)
I want to compare each element of each array to the corresponding element in the other array like so:
s1s[0] == s2s[0] s2s[1] == s2s[1] s1s[2] == s2s[2] and so on...
this has to happen automatically though because s1.length will be variable based on the specific string that's in there. I tried to iterate through the array with
s2s.each{
|i|
a = 0
i == s1s[a]
a + 1
}
but all the values return false even if s2 == s1. How can I maek this work?
plz gimme some ruby magic here thx

New Topic/Question
Reply




MultiQuote





|