darksh3ll
6/20/2018 - 6:55 PM

Phrase drole

let sujet = ["nicolas-sarkozy","ma femme","francois-hollande","mon frere","mon cousin"];
let verbe = ["attaque","sauve","tue","mange","suce"];
let complement = ["un chien","un chat","une sucette"];

function aleat(arr) {
    return arr[Math.floor(Math.random() * arr.length)];
    
}

console.log(aleat(sujet) + " "+ aleat(verbe) + " " + aleat(complement));