DEV Community


Discussion on: Stop Using "data" as a Variable Name

cwraytech profile image
Christopher Wray

Wow, totally agree! Another one is “payload”. Why in the world would you use that as a variable? What is the payload expected to be? That is what the variable should be named.

I also really like your definition of accountIndex vs i. Makes way more sense.

dcwither profile image
Devin Witherspoon Author

payload is a great example! Super generic, could be anything, all it tells us is it’s probably not metadata. I think it has the same exceptions as data as well.