+ 1

What's wrong with my random number generator?

I've tried googling this and my results from each answer seem to be the same thing. I have no clue how to fix this or make it proper. Can someone help me please? I've attached the code. https://code.sololearn.com/WiKIqbEz8v7M/?ref=app

4th Oct 2018, 2:27 AM
Archie
Archie - avatar
3 Réponses
+ 6
Åtomıc well Calviղ have provided the hint for you as the DOM elements are not loaded/available yet when the JavaScript run. Here's a demo code I've written to determine the exection order of Web Codes in SoloLearn. Once you understand it the rest will be a piece of cake, have fun! 😉 https://code.sololearn.com/WXe61FrE4YD4/?ref=app
4th Oct 2018, 4:42 AM
Zephyr Koo
Zephyr Koo - avatar
+ 1
Call dom access function in onload callback
4th Oct 2018, 2:41 AM
Calviղ
Calviղ - avatar
0
I found out what was wrong, and so I removed the + 1 and last + minimum. it was adding one extra digit making me thing it isn't working. Its fixed now
4th Oct 2018, 10:46 AM
Archie
Archie - avatar