r/javascript • u/DrAdalbbert • Oct 27 '26
I've proven that you don't need quotes or parentheses in JavaScript
https://blog.ikaes.de/generating-strings-without-parentheses-in-javascript/You can overwrite the prepareStackTrace property of the Error object by String prototype's functions and invoke them without parentheses. Then by overwriting the Error and Array prototype it is possible to control the arguments. Combining this behavior, together with some JSFuck-inspired tricks, it is possible to generate arbitrary JavaScript strings and run arbitrary JavaScript with only letters + - = and ,
98
Upvotes
61
u/Elkemper Oct 27 '26
That is an extraordinary way to use free will!
17
u/Designer_Mountain_84 Oct 27 '26
But… why?
2
u/jippen Oct 27 '26
Have you seen the chaos of the jsfuck transpiler? I think you would get a kick out of it as well.
8
u/tubbo Oct 27 '26
isn't this basically coffeescript?
1
u/Alternative_Can7374 Oct 28 '26
Reminds me of https://jsfuck.com/
0
u/Ronin-s_Spirit Oct 28 '26
.. so what?