aemkei / jsfuck

Write any JavaScript with 6 Characters: []()!+
jsfuck.com
Do What The F*ck You Want To Public License
8.16k stars 674 forks source link

Encoding simple IIFE seems to fail #49

Closed kylebakerio closed 8 years ago

kylebakerio commented 8 years ago

when I try to encode (function(){return 1})(), and copy and paste the output and run it in my console, that code returns 'undefined' instead of 1. (That said, if instead of return 1 I put alert(1), it does work.)

hazzik commented 8 years ago

You need to encode 'return (function(){return 1})()'

When you select 'eval' option, it is already IIF style function On Tue, 15 Mar 2016 at 8:52 AM Kyle Baker notifications@github.com wrote:

when I try to encode (function(){return 1})(), and copy and paste the output and run it in my console, that code returns 'undefined' instead of

  1. (That said, if instead of return 1 I put alert(1), it does work.)

— Reply to this email directly or view it on GitHub https://github.com/aemkei/jsfuck/issues/49.

aemkei commented 8 years ago

Thanks @hazzik !