Advertisement
Guest User

Untitled

a guest
Nov 26th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const questions = ['pierwsze', 'drugie', 'trzecie', 'czwarte'];
  2. const getQuestion = () => {
  3.   document.getElementById('question').innerText =
  4.     questions.splice(Math.floor(Math.random() * questions.length), 1)[0]
  5.     || 'Nie ma więcej pytań';
  6. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement