paint-brush
Stop Using The ‘else’ Keyword in Your Codeby@dangtrunganh
5,322 reads
5,322 reads

Stop Using The ‘else’ Keyword in Your Code

by Trung Anh Dang3mMay 12th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

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.

Company Mentioned

Mention Thumbnail
featured image - Stop Using The ‘else’ Keyword in Your Code
Trung Anh Dang HackerNoon profile picture
Trung Anh Dang

Trung Anh Dang

@dangtrunganh

I write about things that I like and things that I don’t, mainly in the business, art and tech spher

Learn More
LEARN MORE ABOUT @DANGTRUNGANH'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Trung Anh Dang HackerNoon profile picture
Trung Anh Dang@dangtrunganh
I write about things that I like and things that I don’t, mainly in the business, art and tech spher

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite