<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<script>
const _getUniqueNums = (start,end,n) => {
//刀耕火种
var nullArr=[];
for(var i=0;i<n;i++){
var num = Math.floor(Math.random() * (end - start + 1) + start);
nullArr.push(num)
}
let lastArr = [...new Set(nullArr)]
return lastArr
}
console.log(_getUniqueNums(10,20,6))
</script>
</body>
</html>