DEV Community

Ask DEV - What are your less well known tips for cleaner, better JavaScript/TypeScript?

We've all seen object destructuring, using prettier and eslint, but what else should we look into? What are your less well known tips for cleaner, better JavaScript/TypeScript?

Top comments (1)

Collapse
 
stoyanystoyanov profile image
Stoyan

In Typescript, force yourself to never use "any", I was amazed how much I was using it, and with the change I have to create interfaces/classes/enums, and all of this makes the code more readable and well structured.