Home > OS >  Random text in javaScript
Random text in javaScript

Time:03-23

I'am trying to make a random function that every time that apper, apper with a different text

I have done a array like this:

let text = ['Oh Noo!!', 'You lost!', 'Try a next time!!'];

and here is the function:

function drawGameEnd() {
  
  if (gameOver || gameWin) {
      text = "Congrats!           
  • Related