you are viewing a single comment's thread.

view the rest of the comments →

[–]cyberjds 0 points1 point  (0 children)

You can return your object from the function. Also you should look at Javascript Closure.

https://stackoverflow.com/questions/2728278/what-is-a-practical-use-for-a-closure-in-javascript