/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function aleatorio(inferior,superior){ numPosibilidades = superior - inferior aleat = Math.random() * numPosibilidades aleat = Math.round(aleat) return parseInt(inferior) + aleat }