JSFiddle - React, Tailwind, and code Playground

by saidulu401

JavaScript

fullname = 'John Doe';
var obj = {
   fullname: 'Colin Ihrig',
   prop: {
      fullname: 'Aurelio De Rosa',
      getFullname: function() {
         return this.fullname;
      }
   }
};

//console.log(obj.prop.getFullname());

var test = obj.prop.getFullname;
console.log(obj.prop.getFullname());
//console.log(test.call(obj.prop));
//console.log(test.call(obj));
//console.log(test.call(this));