JSFiddle - React, Tailwind, and code Playground

JavaScript

class Service {
  constructor(){
    this.numbers = [1,2,3];
  }

  doAnotherThing() {
    console.log("I do the thing after 100 millis", this.numbers);
  }
  
  doSomething(){
    setTimeout(this.doAnotherThing, 100);
  }
}

let service = new Service();
service.doSomething();