[javascript] Can I overload an object with a function?
- by user257493
Lets say I have an object of functions/values. I'm interested in overloading based on calling behavior.
For example, this block of code below demonstrates what I wish to do.
var main_thing = {
initalized: false,
something: "Hallo, welt!",
something_else: [123,456,789],
load: {
sub1 : function() {
//Some…