JavaScript
Result
Run
License
// 두 개의 값 사이의 난수 생성 function getRandomNumber(min, max) { min = Math.ceil(min); max = Math.floor(max); // 최대값 제외, 최소값은 포함 return Math.floor(Math.random() * (max - min)) + min; } console.log(getRandomNumber(1, 10));
Console
expand_less
License
License
by DevDic
Close