News for hackers. Stuff that matters.
Re:Writing JavaScript with Only Six Characters by matsemann on Tuesday December 17, 2019 @03:38AM (#21811788)
Is there a limit to what one can do with these six characters? Like, now we're reading values from the string "false". We also could read from "true", and maybe undefined (how?). But can one do more? If one can generate "window", one should be able to call functions through window["functionName"]() and do general computing with this, I think?
Re:Writing JavaScript with Only Six Characters by ewendel on Tuesday December 17, 2019 @03:57AM (#21811881)
As I understand, there's no limit to what you can do with these six characters.

It quickly gets more complicated though, and will require alot more code:

"undefined": [][![]]+[] (empty array accessed at index 0 turned into string)

"NaN": +{}

"[object Object][object Object]": {}+{}

.. etc

See the full list here:

https://github.com/aemkei/jsfuck/blob/master/jsfuck.js

Re:Writing JavaScript with Only Six Characters by maury91 on Tuesday December 17, 2019 @03:52AM (#21811859)
you can obtain undefined by accessing the first element of an empty array. `([])[+!![]]`