I’m trying to loop through 2 arrays, and notice some odd behaviour,
probably because the syntax is not correct
unsorted.each do |x|
sorted.each do |y|
puts 'this is que_words ’ + x + ‘.’
puts 'this is s_words ’ + y + ‘.’
I added the ‘puts’ in as I’m trying to build a bigger block of code
and trying to take it one step at a time with some checking in place.
unsorted has elements, sorted is empty.
When I run the above, nothing is output. When I comment out the
sorted loop, unsorted outputs it’s elements. Would having an empty
array effect the output of unsorted or is this just plain wrong ?