Message from JavaScript discussions

June 2019

β€” Generalizing the hell out of programmers


I just discovered one thing I was not aware of :O
if you return in the try part of a try/catch statement, it will not call the catch statement, if the righthand statement of return throws an error :S

β€” And what!! keyword throw is not allowed in ternary operator? :S

β€” Are you testing js or what🀀

β€” No, I am discovering things in my code that should not cause problems :)

β€” But they do

β€” Keywords aren't allowed in expressions period

β€” Not true? :S

β€” Is that a FP-style rule or a syntax restriction.

β€” I would have expected, that a ternary operation allows the same syntax as if/else would do.

β€” Very true

β€” Well it doesn't, it's different syntax