From: VK on
On Apr 28, 4:51 am, "Richard Cornford" <Rich...(a)litotes.demon.co.uk>
wrote:
> Might that not be the point of that question; that the answer should
> include the fact that different environments (and, in broad terms,
> which) will result in different values. Possibly making the other two
> questions no more than camouflage to conceal the trap here.

" 1. a = 2; b = a++ + (--a * ++a);
2. b=!-[1,];
3. b = +!{}[0]; "

IMHyetStrongO the really right answer the company expects is: "Find
that guy who produced any resemblance of the code above and hand him
on the highest tree in company's office backyard with the tablet
'Squeezecrypters to be warned'. Make sure that it visible from the
office windows."
A lesser sadistic variant of the answer: "Find that squeezecrypter and
fire his a** out. Take me instead: you will never see anything like
that in my code".

At least I would take that candidate right away, no matter if others
would sent a step-by-step per platform explanations.

P.S. I am not kidding - except hanging one anyone.
P.P.S. I am not pretending to that job. Just a boss-to-boss
suggestion.