I see someone wrote Return || item
in Javascript, what does this mean in a hacky form of code?
Asked
Active
Viewed 38 times
0

Proyb
- 3
- 1
-
2Poor video quality, it says `return !! userId` – adeneo Apr 04 '15 at 06:15
-
@adeneo Ah, good catch - got me of guard| – user2864740 Apr 04 '15 at 06:16
-
http://stackoverflow.com/questions/784929/what-is-the-not-not-operator-in-javascript (for the 'actual code') – user2864740 Apr 04 '15 at 06:18
1 Answers
3
return || item
is SyntaxError. Video is saying !!
(logical not not), which converts value to boolean.

hibiya
- 116
- 1
- 7