-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.js
More file actions
28 lines (15 loc) · 832 Bytes
/
function.js
File metadata and controls
28 lines (15 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
let who = ['the dog','my granma','his turtle','my bird'];
let what = [' eat',' pissed',' crushed',' broked'];
let when = [' before the class',' right in time',' when I finished',' during my lunch','while I was praying'];
let Pwho = who.length;
let preguntasWho=Math.round(Math.random()*(Pwho-1));
let Pwhat = what.length;
let preguntasWhat=Math.round(Math.random()*(Pwhat-1));
let Pwhen = when.length;
let preguntasWhen=Math.round(Math.random()*(Pwhen-1));
function mostrarPreguntaWho() {
document.write(who[preguntasWho]);};
function mostrarPreguntaWhat() {
document.write(what[preguntasWhat]);};
function mostrarPreguntaWhen() {
document.write(when[preguntasWhen]);};