diff --git a/js/random.js b/js/random.js index 13e6528ed7d98d0befc8855be75d6e237c40d7b0..bd2d3220fbd94e86e9af0585e10546ba45383286 100644 --- a/js/random.js +++ b/js/random.js @@ -40,7 +40,7 @@ function jsRandom(min, max, count = 1) { for (let i = 0; i < count; i++) { total += rand(); } - return Math.floor(total/count); + return Math.floor(total / count); } /** @@ -61,9 +61,9 @@ function jsRandomMany(arr, count) { /** * Accepts both an array and a list, returns undefined if nothing is passed. - * @param {number|string|number[]|string[]} choices - * @param {...(number|string|number[]|string[])} otherChoices - * @returns {number|string|number[]|string[]|undefined} + * @param {any[]} choices + * @param {any[]} [otherChoices] + * @returns {any} */ function jsEither(choices, ...otherChoices) { if (otherChoices.length === 0 && Array.isArray(choices)) {