DEV Community

Discussion on: What are the tips or techniques you wish someone had told you ages ago?

Collapse
 
mario_sommer profile image
Mario Sommer

The one thing that transformed the way I write code now the most was when I started to use early returns. In my opinion it makes it so much more readable. That's definitely one thing I wish I discovered earlier.


const myFunc = () => {
  if(nope) return

  // ... actual stuff
}