<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<script>
const _getUniqueNums = (start,end,n) => {
// 补全代码
let arr = [];
while(arr.length<n){
let v =Math.floor(Math.random()*(end-1)+start)
if(arr.indexOf(v)===-1){
arr.push(v)
}
}
return arr
}
</script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<script>
const _getUniqueNums = (start,end,n) => {
// 补全代码
let arr = [];
while(arr.length<n){
let v =Math.floor(Math.random()*(end-1)+start)
if(arr.indexOf(v)===-1){
arr.push(v)
}
}
return arr
}
</script>
</body>
</html>