JSFiddle - React, Tailwind, and code Playground

by matmuchrapna

JavaScript

var object = {
    property: 1,
    method: function() {
        return this.property;
    }
};

object.prototype.foo = function() {
    return this.method(); // 1
};



var asd = object.foo();

console.log(asd);