+ 2

How to remove this error, please help

Error in java script https://code.sololearn.com/Wzo2RtltCrh6/?ref=app

21st Jun 2020, 8:00 AM
Eluri Venkata Vamsidhar
Eluri Venkata Vamsidhar - avatar
3 odpowiedzi
+ 2
I see the problem: "pickRandom" is not a built-in function in JavaScript. You should implement it yourself.
21st Jun 2020, 8:12 AM
Felipe BF
+ 4
That function cann be for example: function pickRandom(x){ return x[Math.floor(Math.random() * x.length)]; }
21st Jun 2020, 10:12 AM
JaScript
JaScript - avatar
+ 1
Thank you very much, actually I learnt it from Google Grasshopper
21st Jun 2020, 8:53 AM
Eluri Venkata Vamsidhar
Eluri Venkata Vamsidhar - avatar