+ 6

Why the code below with input value 36, output is 4 but not 1?

So, I can't solve it. Please help me? https://code.sololearn.com/W554eG5rM5pa/?ref=app

23rd Jan 2021, 2:39 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
2 Answers
+ 6
Yes, it is really works fine. Thanks to You, Abhay
23rd Jan 2021, 2:49 PM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
0
This should work fine, var nmbrvol= (numberVolunteers% 5==0)?0:5-numberVolunteers%5; console.log(nmbrvol);
23rd Jan 2021, 2:41 PM
Abhay
Abhay - avatar