Vou escrever isso aqui depois
Created
October 20, 2018 17:55
-
-
Save pedrofracassi/d0254f27918b89181d5b0a99d1bd27fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var palavras = [ | |
['but', 'won\'t'], | |
['he'], | |
['definitely', 'definitly', 'definetely', 'deathly', 'defiantly', 'deftly'], | |
['negotiated'], | |
['this', 'his'], | |
['way'], | |
['past the', 'pass the', 'passing the'], | |
['harbour', 'harbor', 'harbouring', 'harboring'], | |
['enclosure', 'in closure', 'closure'] | |
]; | |
var usadas = []; | |
var frase = ""; | |
function randomFromArray(array) { | |
return array[Math.floor(Math.random()*array.length)]; | |
} | |
while (0 != 1) { | |
var frase = ""; | |
palavras.forEach(function(entry) { | |
frase = frase + " " + randomFromArray(entry); | |
}); | |
if (frase.toString().length - 1 == 59) { | |
if (!usadas.includes(frase)) { | |
usadas.push(frase); | |
console.log(frase); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment