Added language data

This commit is contained in:
Erik Tiekstra
2021-04-16 15:52:39 +02:00
parent 258d7fbc67
commit 0583d7e82d
14 changed files with 536 additions and 25 deletions

View File

@@ -0,0 +1,14 @@
function chooseRandom(arr, num = 1) {
const res = [];
for (let i = 0; i < num; ) {
const random = Math.floor(Math.random() * arr.length);
if (res.indexOf(arr[random]) !== -1) {
continue;
}
res.push(arr[random]);
i++;
}
return res;
}
export default chooseRandom;