jsam
1/31/2015 - 12:10 PM

what it will print out?

what it will print out?

var fullname = 'Samuel';
var obj = {
   fullname: 'Alexandar',
   prop: {
      fullname: 'Alessio',
      getFullname: function() {
         return this.fullname;
      }
   }
};
 
console.log(obj.prop.getFullname());
 
var test = obj.prop.getFullname;
 
console.log(test());