I\’ve never dabbled in making javascript object like this but I think I have a good reason.
Here is my example:
x = new Something(pallet,[\'blue\',\'green\',\'orange\']);
x.try([\'blue\']);
I want to make a object that sets up two variables pallet and the colors array.
Then in the try function I want to pass an array but in the function I\’d like access to pallet and the colors object. Can someone tell me if this is possible? Perhaps a little demo or tutorial?





Rating:
The post javascript – creating a object with shared variables appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/javascript-creating-a-object-with-shared-variables.html
No comments:
Post a Comment