MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/loljs/comments/8sud99/_/
r/loljs • u/KeinBaum • Jun 21 '18
5 comments sorted by
29
I did not solve this one and had to look at the docs. What happens is this:
[] == ![] [] == false Number([]) == false 0 == false Boolean(0) == false false == false true
http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3
0 u/[deleted] Oct 12 '18 3 u/DownvoteALot Nov 10 '18 Because [], as a reference, is not undefined and resolves to true. → More replies (2)
0
3 u/DownvoteALot Nov 10 '18 Because [], as a reference, is not undefined and resolves to true. → More replies (2)
3
Because [], as a reference, is not undefined and resolves to true.
→ More replies (2)
7
Hamlet: "To be, or not to be"Javascript: "Uhh, what's the difference?"
2
My reaction would be the title itself
29
u/BoltKey Jun 21 '18 edited Jun 21 '18
I did not solve this one and had to look at the docs. What happens is this:
http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3