101 reputation
2
bio website tikend.sk
location Bratislava, Slovakia
age 22
visits member for 2 years, 6 months
seen Jan 29 at 11:08

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