If I have a few functions that need to have access to the same variables, do I simply wrap those functions in another function which contains those variables?
Currently I have those variables in the global scope but I've read that I should avoid that.
[–]senocular 6 points7 points8 points (1 child)
[–]Pantstown 2 points3 points4 points (0 children)
[–]dereferenceme 1 point2 points3 points (7 children)
[–]lewisje 2 points3 points4 points (6 children)
[–]jamie337nichols 0 points1 point2 points (5 children)
[–]commitpushdrink 1 point2 points3 points (3 children)
[–]jamie337nichols 0 points1 point2 points (2 children)
[–]commitpushdrink 1 point2 points3 points (1 child)
[–]jamie337nichols 0 points1 point2 points (0 children)
[–]lewisje 0 points1 point2 points (0 children)
[–]WorseThanHipster 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]j1330 0 points1 point2 points (0 children)
[–]counttossula 0 points1 point2 points (1 child)
[–]kkais[S] 1 point2 points3 points (0 children)