Sometimes you need variable in a function to persist across invocations. You can always define global variable to do that. However, that clusters up the namespace.
A better way to do that is to define a function property accessible only to that particular function. Example:
1 2 3 4 5 6 |
|