Code, Nerdyness, and Nonsense...: Code Cleanup With The Ternary Operator →
Every time I write a simple function to return a value, I almost always write the same code. It is usually along the lines of this:
if(indexPath.section == 0) return 45; return 65;And immediately after writing it, I scratch my head and go “What the heck am I thinking?”. That’s when I remember…
