function selectRendom(startNum,endNum){ var choose = endNum - startNum +1; return Math.floor(Math.random()*choose+startNum) }; alert(selectRendom(2,3));