Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Yes, the spaceship operator is used for comparing two Ruby objects.
It can return 3 possible values:
Where -1 means that the object on the right side of the operation is smaller than the other object.
Then 0 means that the objects are equal.
And 1 means the object on the right i greater then the other object.
can someone explain the spaceship operator?