Fuck. That does it. I’m off to BSD.
Fuck. That does it. I’m off to BSD.
They make it look like it’s cute, but when a cat sits in your keyboard they are secretly writing regex.
_ 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.
Or this one without the “undefined” when run in a browser console:
for(_=[];_<+!![]+""+[]*[]+[]*[]-!![]-!![];_++%+(!![]+!![])?[]:console.log(_));_+!![]
Actually, I prefer this one:
for(_=[];_<+!![]+""+[]*[]+[]*[];_++%+(!![]+!![])?[]:console.log(_));
Want to print out all odd numbers from 1 to 100? Easy:
for(_=[];_<+!![]+""+[]*[]+[]*[];_++)(_%+(!![]+!![])?console.log(_):[]);
What about if you read about it and didn’t understand it?
100% laser printer. My Brother laser paid for itself the first time I bought a set of cheap toner for it. I don’t understand why people buy/rent inkjet ripoffs.
It’s hit 50% for me. Well probably more like 75% because I use WSL a lot.