javascript - How to get a random number in a symmetric range in JS?
淡淡烟草味
淡淡烟草味 2017-07-05 10:44:41
0
4
674

For example, I want to use Math.random() to get random numbers in the ranges of -20~-10 and 10~20. Is there any most streamlined solution? For example, can it be done without an if statement? Thank you all for clearing up the confusion.

淡淡烟草味
淡淡烟草味

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!