JSFiddle - React, Tailwind, and code Playground

by titansoftime

HTML

<div id="output"></div>

JavaScript

var a = {

    val: 23,
    
    div: null,
    
    test: function(){
  
        this.div.innerHTML = this.div.innerHTML + ' ' + this.val;
    
    },
    
    run: function(){

        requestAnimationFrame(a.run);

        a.test();

    },

    init: function(){
        
      this.div = document.getElementById('output');
        
      this.run();
      
    }
    
};

a.init();