DEV Community

Discussion on: Tips for code newbies from an experienced programmer

Collapse
 
rolandcsibrei profile image
Roland Csibrei • Edited

Thanks for the the article. 😊

It would be better to call the method isAuthenticated or hasAuthenticationInfo. For booleans it is always good to prefix the methods with is or has.

Use braces for if or put the return statement on the same line with if to avoid accidentally inserting a statement between the if and the return statement,thus breaking the code.

Have a nice day!

Collapse
 
iraamoni profile image
Suborna

thank you Roland, I really really appreciate your suggestion :D :D