0
Why does this return an error? Functions, randomization, innerHTML
This is my code: function randomInt(param1){ return Math.floor(Math.random()*param1); }; var body = document.body; body.innerHTML += randomInt(10); Why does this produce an error?
2 Answers
+ 2
No errors, the code is working.
https://code.sololearn.com/WRD5TLkvbzzx/?ref=app
0
How come when I cut that code out and place it in the JS section I receive an error?