How js sorts arrays in random order
This article will explain in detail how js sorts arrays in random order. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Sort the array in random order
Example
Var points = [40,100,1,5,25,10]; points.sort (function (a, b) {return 0.5-Math.random ()}); this is the end of the article on "how js sorts arrays in random order". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.