首次提交

This commit is contained in:
duan
2024-06-06 11:49:50 +08:00
parent de480ef0a3
commit c5ebf34d7e
274 changed files with 58048 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
// 打乱数组
function randomArray(array = []) {
// 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
return array.sort(() => Math.random() - 0.5);
}
export default randomArray