aemkei / jsfuck

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

undefined compiles in to nothing #92

Open takashi1kun opened 4 years ago

takashi1kun commented 4 years ago

i have a script that basically checks

someVariable === undefined && etc...

When i convert it to jsfuck and run it and then the browser it gives error because it is read as: someVariable === && etc...

takashi1kun commented 4 years ago

You can check by compiling this code:

if(undefined == undefined && true){console.log("test")}

It gives error Unexpected token '==' and if you click the VM in the debug console to see what is doing it appears it gets compiled to this:

(function anonymous(
) {
if( ==  && true){console.log("lol")}
})
hazzik commented 4 years ago

Same as #68 (fixed in #75)

I assume you are talking about the website, which has outdated version.