比赛计分板

This commit is contained in:
masnn committed 2020-04-11 21:51:51 +08:00
1 parent 9bf3343a64
commit f73859a42f
4 files changed
+172 -32

No files matched your search

+13
View File
@@ -14,3 +14,16 @@ String.random = function (digit) {
str += map[Math.floor(Math.random() * 62)];
return str;
};
/**
* @param {Array} a
* @param {Array} b
*/
Array.isDiff = function isDiff(a, b) {
if (a.length != b.length) return true;
a.sort();
b.sort();
for (let i in a)
if (a[i] != b[i]) return true;
return false;
};