generate functionMon, 27 Mar 2023

Una función que sume números al azar

function sumRandomNumbers(a) { var total = 0; for (var i=0; i < a; i++) { total += Math.floor(Math.random() * (10 - 1) + 1) } return total; } sumRandomNumbers(5)

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant