3 ms·
It looks like the generator is suboptimal, but still really cool. (![]+[])[+!+[]] evaluates to "a" as well. It looks like it turns it into an array twice. It
by bargl 13y ago
It looks like the generator is suboptimal, but still really cool.
(![]+[])[+!+[]] evaluates to "a" as well. It looks like it turns it into an array twice.
It goes
+!+[] === 1 then
[+!+[]] === [1] then
+[[+!+[]]] === 1 then
[+[[+!+[]]]] === [1]