To accomplish what you want you have to
1. change the object in what namespace is declared.
var a = {};
a = function () {alert("hey");};
2. if your really want to to use the function mutate than
var a = {};
function mutate(obj) {
obj = function() {
alert("hey");
}
return obj;
}
a = mutate(a);
The 2nd option looks like a hack to me though.
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]