#ECMAScript 6 - 155 168 158#
ECMAScript 6 - 155 168 158
Warning: 200 alert dialogs (change alert
to console.log
to test)
for(i=0,s={},r=Math.random,l=x=>String.fromCharCode(65+r()*26);i<200;)/ASS|666|69|KKK|SHT/.test(p=(r()+'-'+l()+l()+l()).slice(-7))?0:s[p]=s[p]||(alert(p),i++)
Edit: Oops. Original version printed duplicates...
Edit 2: Closer to the original score now - switched from a set to an associative array with some fugly duplicate checks allowing it to print as it goes
Tested in Firefox console.