We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f00ff20 commit 895c9a0Copy full SHA for 895c9a0
13/js/utils.js
@@ -1,14 +1,3 @@
1
-const getRandomInteger = (a, b) => {
2
- const lower = Math.ceil(Math.min(a, b));
3
- const upper = Math.floor(Math.max(a, b));
4
- const result = Math.random() * (upper - lower + 1) + lower;
5
-
6
- return Math.floor(result);
7
-};
8
9
-export const getRandomArrayElement = (elements) =>
10
- elements[getRandomInteger(0, elements.length - 1)];
11
12
export const isEscapeKey = (key) => key === 'Escape';
13
14
export const showErrorMessage = () => {
0 commit comments