@Naich@lemmings.world avatar

Naich

@Naich@lemmings.world

Dieses Profil is von einem föderierten Server und möglicherweise unvollständig. Auf der Original-Instanz anzeigen

Naich ,
@Naich@lemmings.world avatar

It's hit 50% for me. Well probably more like 75% because I use WSL a lot.

Naich ,
@Naich@lemmings.world avatar

Want to print out all odd numbers from 1 to 100? Easy:

for(_=[];_<+!![]+""+[]*[]+[]*[];_++)(_%+(!![]+!![])?console.log(_):[]);

Naich ,
@Naich@lemmings.world avatar

Actually, I prefer this one:
for(_=[];_<+!![]+""+[]*[]+[]*[];_++%+(!![]+!![])?[]:console.log(_));

Naich ,
@Naich@lemmings.world avatar

Or this one without the "undefined" when run in a browser console:

for(_=[];_<+!![]+""+[]*[]+[]*[]-!![]-!![];_++%+(!![]+!![])?[]:console.log(_));_+!![]

Naich ,
@Naich@lemmings.world avatar

_ is a variable name, [] becomes 0 when converted to an integer, !![] becomes 1. The + "" + means that the integers 1, 0, 0 get converted to a string - "100", which gets converted back to an integer because it's in the for loop. And there's various other horrible conversions going on to make it all work.

  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • haupteingang
  • Alle Magazine