Programming Tip #2: Avoid globals for dependencies; instead inject them as function arguments.

Jesse Warden - Apr 30 '22 - - Dev Community

Programming Tip #2: In JavaScript, Python, and Lua, avoid globals for dependencies; instead inject them as function arguments.

Image description

Learn More from Justin Searls and Dave Farley below.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .