New interview question: What will be the result of running the following code? [][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[ ]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[] ])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+ (!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+ !+[]+[+[]]]+(![]+[])[!+[]+!+[…
JSFuck (2012)
71–80 of 168 posts
Re: JSFuck (2012)
#72JSFuck – esoteric JavaScript - https://news.ycombinator.com/item?id=9479834 - May 2015 (38 comments)
JSFuck – Write any JavaScript with 6 Characters: []()!+ - https://news.ycombinator.com/item?id=6379732 - Sept 2013 (71 comments)
JSFuck []()+ Use only 6 characters to write any JavaScript - https://news.ycombinator.com/item?id=4421848 - Aug 2012 (1 comment)
Re: JSFuck (2012)
#73Re: JSFuck (2012)
#74New interview question: What will be the result of running the following code? [][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[ ]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[] ])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+ (!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+ !+[]+[+[]]]+(![]+[])[!+[]+!+[…
I think someone once asked me the simplified variant of that question. What is the result of: []+[] And I didn’t know the answer to that (I mean, who does that kind of fuckery in Javascript, you can’t sum arrays). I would have no chance with these Google level questions.
Re: JSFuck (2012)
#75I probably deserve to get downvoted to oblivion for this but... I've deployed JSFuck in production! We wanted to obfuscate this bit of code, to make life just a little bit harder for reverse engineers. We made this huge function where we pretty much passed in all our application state, and it would run this JSFuck code, and spit out a token. We even made a few tweaks to the code so that you couldn't just reverse it b…
Please tell me who you work for and the website where this is deployed so I can avoid both.
Re: JSFuck (2012)
#76Earlier quoted context omitted.
That's an idiotic interview question. I've experienced this at young companies where both the company and its engineers are too immature to understand basic etiquette in the industry. Btw I doubt Google would ask a stupid "gotcha" question like that. They tend to ask hard algorithmic questions.
FWIW I’ve had Google recruiters ask me stuff where they don’t understand the answer and the questions are things like “what is the protocol number for ICMP” and “what port does NTP use”. If one doesn’t work with these things very often, they’re very forgettable as they’re so easy to google and find the correct answer to in seconds, and therefore not worth memorizing. No idea if they’re still doing this, but it was li…
Re: JSFuck (2012)
#77Earlier quoted context omitted.
Why are you reverse engineering my code in the first place?
Because it's broken for my usecase, and I need to do something slightly different on the webpage
I think the problem with this thread is people think I am writing browser code, or code that is going to be shared on GitHub.
I am not.
Also I'm only half joking as I've indicated with the "/s" below.
Re: JSFuck (2012)
#78Re: JSFuck (2012)
#79Earlier quoted context omitted.
I'll make you a promise: if your code never ends up on my machine, I will never try to reverse it. Otherwise, all bets are off.
Why would I put it on YOUR machine? It's my code. Don't hack my servers, or all bets are off. /s
Re: JSFuck (2012)
#80Earlier quoted context omitted.
I'll make you a promise: if your code never ends up on my machine, I will never try to reverse it. Otherwise, all bets are off.
Why would I put it on YOUR machine? It's my code. Don't hack my servers, or all bets are off. /s