Created
June 4, 2019 01:57
-
-
Save Andyliwr/eccb70b74ad815d0b24db31c08c55646 to your computer and use it in GitHub Desktop.
随机生成手机号码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const headerNums = new Array("139","138","137","136","135","134","159","158","157","150","151","152","188","187","182","183","184","178","130","131","132","156","155","186","185","176","133","153","189","180","181","177"); | |
const headerNum = headerNums[parseInt(Math.random() * 10 ,10)] | |
const bodyNum = Math.random().toString().replace('0.', '').slice(0, 8) | |
console.log(headerNum + bodyNum) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment