Skip to main content
Commonmark migration
Source Link

#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.

#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.

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.

[Edit removed during grace period]
Source Link
Alconja
  • 657
  • 5
  • 12
added 164 characters in body
Source Link
Alconja
  • 657
  • 5
  • 12

#ECMAScript 6 - 155 168#168 158#

Warning: 200 alert dialogs (change alert to console.log to test)

for(s=Set()i=0,s={},r=Math.random,l=x=>String.fromCharCode(65+r()*26);s.size<200;;i<200;)!/ASS|666|69|KKK|SHT/.test(p=(r()+'-'+l()+l()+l()).slice(-7))&&s.add(p);s.forEach?0:s[p]=s[p]||(x=>alertalert(xp),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.

#ECMAScript 6 - 155 168#

Warning: 200 alert dialogs (change alert to console.log to test)

for(s=Set(),r=Math.random,l=x=>String.fromCharCode(65+r()*26);s.size<200;)!/ASS|666|69|KKK|SHT/.test(p=(r()+'-'+l()+l()+l()).slice(-7))&&s.add(p);s.forEach(x=>alert(x))

Edit: Oops. Original version printed duplicates...

Tested in Firefox console.

#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.

added 86 characters in body
Source Link
Alconja
  • 657
  • 5
  • 12
Loading
Source Link
Alconja
  • 657
  • 5
  • 12
Loading