JS随机数组排重

JS随机数组排重

用查找数组去重复的效率极低,应该用Object或者JS2015的Set对象做const s = new Set()while(s.size&lt10)s.add(parseInt(Math.random()*10))consol
JavaScript130