You know, it's kind of sad. Before reading the article, I was going to post a reply to your comment like "but omg, javascript has functions that are values!!1". Then I read the article, and found that that's the first "hidden feature".
I guess "hidden feature" means "something that's not in PHP".
I also like how people use terms like "null coalescing operator" when everyone else calls it "short circuiting". They are so smart!!11!
short circuiting is only half of why this example works. The other half is that boolean operators in javascript don't implicitly cast the result as a boolean type.
I guess "hidden feature" means "something that's not in PHP".
I also like how people use terms like "null coalescing operator" when everyone else calls it "short circuiting". They are so smart!!11!