+ 1

Help me solve my problem with code

I can't understand where is the mistake, because I only novice in Ruby https://code.sololearn.com/c4xr30hmSkgf/?ref=app

12th Jun 2019, 3:27 PM
Леонид Гуленков
Леонид Гуленков - avatar
3 odpowiedzi
+ 3
Change all "find == ..." for "a == ..." and either pass "car" as an argument or make it a global variable replacing all "car" for "$car". def find(a, car): if a == 1 ... elsif a == 2 ... elsif a == 3 ... elsif a == 4 ... elsif a == 5 ... elsif a == 6 ... else ... end end find(4, car) find(2, car) https://www.sololearn.com/learn/Ruby/2722/
12th Jun 2019, 4:18 PM
Diego
Diego - avatar
+ 3
Diego, thanks, I will try your advice in 5 min.
12th Jun 2019, 4:43 PM
Леонид Гуленков
Леонид Гуленков - avatar
+ 3
It's help me, thanks a lot)
12th Jun 2019, 5:13 PM
Леонид Гуленков
Леонид Гуленков - avatar