Reputation
Next privilege 125 Rep.
Vote down
Badges
3
Impact
0 people reached

  • 0 posts edited
  • 0 helpful flags
  • 8 votes cast
Jul
9
awarded  Autobiographer
Jan
28
comment Creating variables in methods/functions
Only make variable if it's new, e.g. if you want to add something to existing variable and than use it. Even if you are just returning it modified, there is no need to create new variable. If you are using old variable than just call it.
Jan
28
comment Creating variables in methods/functions
I'll go for the second option. If you are not modifying it and don't want to actually change it, than it's always better to call it where you use it.
Feb
20
awarded  Supporter
Jan
30
awarded  Teacher