0 votes
in Ruby by

Review the code below. Which Ruby operator should be used to fill in the blank so that the sort method executes properly?

[5,8,2,6,1,3].sort {|v1,v2| v1 ___ v2}

a. =>

b. <==>

c. <=>

d. ||

1 Answer

0 votes
by

Review the code below. Which Ruby operator should be used to fill in the blank so that the sort method executes properly?

[5,8,2,6,1,3].sort {|v1,v2| v1 ___ v2}

Correct answer is :-  <=>

Related questions

0 votes
asked Sep 2, 2022 in Ruby by DavidAnderson
0 votes
asked Sep 3, 2022 in Ruby by DavidAnderson
...