Código PHP:
   var mySite = {
        general_1 : 100 ,
        general_2 : 200,
                            
        myObject1 : {
                            
            local_1 : 500,
            funcionLocal : function() {
                var local_2 = 600;
                console.log ("estoy en funcionLocal");
                console.log ("local_1=" + mySite.myObject1.local_1);
                console.log ("local_2=" + local_2);
            }
                        
        },
 
        init : function() {
            console.log ("estoy en init");
            this.funcionalidad1();
            this.myObject1.funcionLocal();
        },
                        
        funcionalidad1 : function() {
            console.log ("estoy en funcionalidad1");
            console.log ("general_1=" + this.general_1);
            console.log ("general_2=" + this.general_2);
        }
    } 
    
 
 

