function selectFrom( lowerValue, upperValue ){ var choices = upperValue - lowerValue + 1; return Math.floor( Math.random() * choices + lowerValue ); } var num = selectFrom( 2,10 ); alert( num );
2022-04-30 01:28:30
function selectFrom( lowerValue, upperValue ){ var choices = upperValue - lowerValue + 1; return Math.floor( Math.random() * choices + lowerValue ); } var num = selectFrom( 2,10 ); alert( num );