-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogetto2generatore.js
More file actions
19 lines (17 loc) · 993 Bytes
/
progetto2generatore.js
File metadata and controls
19 lines (17 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Progettino n°2 Generatore di Insulti
var partiDelCorpo = ["Volto", "Naso", "Taglio di Capelli", "Mento"];
var aggettivi = ["Puzzolente", "Noiosa", "Sciocca"];
var parole = ["Mosca", "Marmotta", "Farfalla", "Scimmia"];
var randomCorpo = partiDelCorpo[Math.floor(Math.random() * 3)];
var randomAggettivo = randomAdjectives[Math.floor(Math.random() * 3)];
var randomParola = randomWords[Math.floor(Math.random() * 5)];
var randomInsulto = "Il tuo " + randomCorpo + " è come una " + randomAggettivo + " " + randomParola + "!!!";
randomInsult; //= "Il tuo Naso è come una Sciocca Marmotta!!!"
//var randomParola = parole[Math.floor(Math.random() * parole.length)];
//var randomInsulto = ["Il tuo", randomCorpo, "è", "come", "una", randomAggettivo, randomParola + "!!!"].join(" ");
/*
Challenges :
-1) nuove parole;
-2) più sofisticati (es “Il tuo [parte del corpo] è più [aggettivo] di un [parte del corpo di animale] di [animale] .”);
-3) usa join;
*/