+ 9
Plz help
When I run this code it comes with an error. https://www.sololearn.com/post/174757/?ref=app
7 odpowiedzi
+ 14
Try using :
document.getElementById("img");
[Assuming you have an image with an id value img].
+ 13
Tru using this :
var x=Math.floor(Math.random()*i);
Math.random() is used only to get random values between 0 and 1 like 0.4562737 or 0.818717 which when multiplied by any value of i will be 0.
So you can floor down the result which gives you the exact number.
+ 12
My pleasure 😊👍
+ 6
Nova thanks it worked
I was using square brackets
+ 6
Nova plz help This code works fine when I output any specific image but I want to generate random images
+ 5
Nova thanks bro
I had been trying this for last few days
+ 4
Nova I've tried
Here is the link of code
https://code.sololearn.com/Wn0mu628JD1d/?ref=app