Why doesn't this work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
16th Aug 2019, 2:27 PM
Rishan [da_coder, semi-active]
Rishan  [da_coder, semi-active] - avatar
3 Answers
+ 6
return Math.round(Math.random() * x);
16th Aug 2019, 2:34 PM
Diego
Diego - avatar
+ 8
Thanks!
16th Aug 2019, 2:37 PM
Rishan [da_coder, semi-active]
Rishan  [da_coder, semi-active] - avatar
+ 4
You must write return in front of that line with random. Also it's random().
16th Aug 2019, 2:34 PM
HonFu
HonFu - avatar