summaryrefslogtreecommitdiff
path: root/src/utils/getRandomInt.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/getRandomInt.js')
-rw-r--r--src/utils/getRandomInt.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/getRandomInt.js b/src/utils/getRandomInt.js
new file mode 100644
index 00000000..900e55f8
--- /dev/null
+++ b/src/utils/getRandomInt.js
@@ -0,0 +1,3 @@
+export const getRandomInt = (max) => {
+ return Math.floor(Math.random() * max);
+} \ No newline at end of file