mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
Added the firebase integration
This commit is contained in:
11
src/Firebase Querys/SelectRandomWord.js
Normal file
11
src/Firebase Querys/SelectRandomWord.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const SelectRandomWord = (arrayWords) => {
|
||||
|
||||
const randomWord = Math.trunc(
|
||||
|
||||
Math.random() * (arrayWords.length - 0) + 0
|
||||
)
|
||||
|
||||
return arrayWords[randomWord]
|
||||
}
|
||||
|
||||
export default SelectRandomWord
|
||||
Reference in New Issue
Block a user