H
13

For months I was naming my JavaScript variables things like 'temp1' and 'data123' - then a senior dev showed me one trick that fixed everything

2 comments

Log in to join the discussion

Log In
2 Comments
thomas_young
thomas_young20d agoMost Upvoted
The temp1 phase is real and honestly embarrassing to look back on lol. What worked for me was just forcing myself to write a comment first describing what the variable holds, then turning that comment into the variable name. Something like "count of active users" becomes activeUsersCount instead of data123. It feels annoying at first but saves so much headache when you come back to code a week later.
7
nelson.finley
That "temp1" phase is brutal, once you start naming things what they actually do it clicks fast.
1