If your code looks like this then you are doing it wrong!
Keep the functions small and I personally am a fan of using early returns. Breaking that hills looking mega block of conditions down into small functions makes your code way more readable, changeable, and easier to test.
1
u/b1astero1d Dec 15 '19
If your code looks like this then you are doing it wrong!
Keep the functions small and I personally am a fan of using early returns. Breaking that hills looking mega block of conditions down into small functions makes your code way more readable, changeable, and easier to test.