-1

My question is about boolean validation of below expression.

If you run (!+[]+[]+![]) in your JS console, it returns us 'truefalse'. How is it possible? How does this logic work?

Eddie
  • 26,593
  • 6
  • 36
  • 58

1 Answers1

0

First part !+[] returns true as a Boolean. Second part []+![] is "false" as String. Concatenating Boolean with String converts the result to string and gives you at the end "truefalse".

Here is provided deep explanation to JSFuck https://github.com/aemkei/jsfuck#how-it-works

Firanolfind
  • 1,559
  • 2
  • 17
  • 36