Skip to content
loading...

re: If/else or just if? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Another option (for those who favour expressions over statements) can be built out of JavaScript's ternary operator: return (typeof val === 'stri...
 

Ternary operators are really nice for simple and small statements, but I definitely wouldn't recommend them for anything complex. Makes things to hard to read for me. The same could be said for other developers.

code of conduct - report abuse