2

I'm investigating why

!+[]

in javascript returns true. Do you have any idea?

Johniak
  • 911
  • 1
  • 9
  • 15

1 Answers1

2

+ is used to force numerical casting of a value and ! negates an expression.

So in this example it'd be

+[] = 0 !0 = true

Lichwa
  • 137
  • 1
  • 11