Information in an array:
scores = %w[ScoreA ScoreB ScoreC ScoreD ScoreE ScoreF ScoreG ScoreH ScoreI ScoreJ]
needs to be presented in ascending order of the golf scores.
Can anyone help sorting the output in ascending order?
golf = scores.map do |score_number|
print "Enter the score for #{score_number}:"
[score_number, gets.to_i]
end
puts golf.sort