+ 5
How to sort alphabetically in ruby
How to sort a string array alphabetically in ruby
6 odpowiedzi
+ 5
Oh, well, of course if you want to do it in-place, you should add an exclamation mark:
arr.sort!
(consider refreshing the tutorial, as this is a pretty basic syntax property of Ruby)
+ 3
Kuba Siekierzyński thanks for your help 🙏
+ 2
You can use the .sort method to accomplish that: (fourth tab under this link)
https://www.sololearn.com/learn/Ruby/2769/
+ 2
But it's not working
+ 1
Proলয় मिश्ra Show the code, please. It should work alright.