📅  最后修改于: 2022-03-11 15:04:07.885000             🧑  作者: Mango
function uniqueNumber(count) {
let defaultNumber = 4413277523420
let convertToArray = defaultNumber.toString().split("")
let sliceNumber = convertToArray.slice(0, count)
let randomNumber = Math.floor((Math.random() * +sliceNumber.join("")));
if (randomNumber.toString().split("").length < count) {
randomNumber = Math.abs(randomNumber - +sliceNumber.join(""))
}
return randomNumber
}