JSFiddle - React, Tailwind, and code Playground

JavaScript

var obj = {

    func1: function () {
      console.log("1");
      this.func2();
      console.log("3");
    },
    
    func2: function () {
      console.log("2");
      this.func3();
    },
    
    func3: function () {
      console.log("2.5")
    }
};

$(document).on("bob", obj.func1);
$(document).trigger("bob");