Is the following possible:
var someObject = {someProperty : "someValue"};
var someFunction = function() {
someProperty = "anotherValue";
};
// what do I do here, in order to use
// someFunction to change someObject without
// directly accessing it from someFunction?
// E.g., none of this:
/*
var someFunction = function() {
someObject.someProperty = "anotherValue";
};
*/
if(someObject.someProperty=="anotherValue") alert("Hooray!");
?
Thanks.
Having read my question and seeing the lack of understanding, here is a simple way that it can be handled (add a parameter):