JSFiddle - React, Tailwind, and code Playground

by spechackers

JavaScript

var myObj = {

    someFunction: function () {
        console.log("some function called");
    },

    anotherFunction: function () {
        console.log("some other function called");
    },

    getData: function (cb) {       
        cb()
    },

    render: function () {
        this.getData(function () {
            this.someFunction();
            this.anotherFunction();
        });
    }
};

myObj.render();