JSFiddle - React, Tailwind, and code Playground

JavaScript

var app = {
  x: 10,

  start: function() {
    window.setTimeout(this.callback.bind(this), 10);
  },

  callback: function() {

    this.print= function () {
      console.log('p '+ this.x);
    }

    console.log('c '+ this.x);
    this.print();

  }
};

app.start();