Ruby Array () function with example
Array#() : () is an Array class method which performs the comparison between the two arrays.
Parameter: Array for the comparison
Return: -1 : array is less than the other array
0 : array is equal to other array
1 : array is greater than the other array
Example #1 :
comparison : 1 comparison : -1 comparison : -1
Example #2 :
comparison : -1 comparison : -1 comparison : 1
My Personal Notes arrow_drop_up
Please Login to comment...