Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    Few people are explicitly using local, but I think most people writing scripts broken up into functions still follow the design principle. Usign local just makes it harder to introduce bugs. Commented Oct 1, 2016 at 13:56
  • local makes variables available to function and its children, so it's really nice to have a variable that can be passed down from function A , but unavailable to function B, which may want to have variable with same name but different purpose. So that's good for defining the scope, and as Voo said - less bugs Commented Oct 8, 2016 at 1:06