“If you don't put the same type on each return sides of your ternary, you might be in for a nasty surprise.”
Definitely true for JavaScript and PHP. I am always surprised what expressions can evaluate to true or false.
Definitely true for JavaScript and PHP. I am always surprised what expressions can evaluate to true or false.
If you don't put the same type on each return sides of your ternary, you might be in for a nasty surprise.