I want random words to be given and nothing comes out.
const palabras = ["hola", "zorro", "kilogramo","viento", "diente", "cabello", "fuego", "lluvia"];
var mipalabra = Math.round(Math.random() * palabra.length);
module.exports= miPalabra;
I want random words to be given and nothing comes out.
const palabras = ["hola", "zorro", "kilogramo","viento", "diente", "cabello", "fuego", "lluvia"];
var mipalabra = Math.round(Math.random() * palabra.length);
module.exports= miPalabra;
I suggest you do it as follows:
I hope it works for you, good luck!
You should export a function
Then where are you going to use it?
you can do it like this: