Hello, how can I write a JavaScript code that creates random numbers from one to ten so that by clicking on a button, this JavaS | Sololearn: Learn to code for FREE!

-2

Hello, how can I write a JavaScript code that creates random numbers from one to ten so that by clicking on a button, this JavaS

3/28/2018 7:47:25 PM

masoud

2 Answers

New Answer

0

Use onclick=“RandomNumbers()” and in JavaScript: function RandomNumbers(){ alert(Math.floor(Math.random()*11)); }

0

For info about random: https://www.w3schools.com/js/js_random.asp