Stop Using The ‘else’ Keyword in Your Code

Written by dangtrunganh | Published 2020/05/12
Tech Story Tags: javascript | tips | programming | tricks | agile | coding-skills | design-patterns | beginners

TLDR If-else keyword built into nearly every programming language and simple conditional logic are easy for anyone to understand. But if you are a good programmer, don’t use this keyword. One of the biggest mistakes I fell into when starting was overusing the else keyword when writing conditionals. I stopped using this keyword in my programs since 5 years ago. To avoid if/else if, to only use if statements, to spend the time to ensure the entry criteria for your group of if’s are mutually exclusive.via the TL;DR App

no story

Written by dangtrunganh | I write about things that I like and things that I don’t, mainly in the business, art and tech spher
Published by HackerNoon on 2020/05/12