Skip to content

Instantly share code, notes, and snippets.

@Kitsumi
Created February 13, 2016 23:41
Show Gist options
  • Save Kitsumi/774656c4360a0056c4fd to your computer and use it in GitHub Desktop.
Save Kitsumi/774656c4360a0056c4fd to your computer and use it in GitHub Desktop.
function getGlee() {
var con = "bcdfghjklmnpqrstvwxyz";
var vow = "aeiou";
var conRan = Math.floor(Math.random()*21);
var conRann = Math.floor(Math.random()*21);
var vowRan = Math.floor(Math.random()*5);
return con.substring(conRan, conRan+1) + vow.substring(vowRan, vowRan+1) + con.substring(conRann, conRann+1) + (Math.floor(Math.random()*89)+10);
}
var tri = 0;
function GetGet() {
var glee = getGlee();
if (glee != "get52") {
tri++;
console.log("Got "+ glee+", not get52, TRY AGAIN!");
setTimeout(function(){
GetGet();
}, 50);
} else {
console.log("Glee received after "+tri+" tries!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment