So basically I have a JS function which looks like:
var myFunc = function () {
var settings = {/*my default settings */};
function otherFunc(arg){
/*do stuff*/
}
otherFunc(settings);
return {settings:settings};
}()
Now, using the console I can call myFunc.settings and it will perfectly output these, however I want to user to overwrite the default settings such as:
<script src="myfunc.js"></script>
<script>myFunc.settings = {/*overwrite some settings*/};</script>
Now myFunc.settings are the new settings, yet the function still uses the 'old' settings. Any clue how I would go about this?
Thanks!