JSFiddle - React, Tailwind, and code Playground

by Allen Wu

HTML

<div id="AA"></div>

<div id ="BB"></div>

JavaScript

var indexobj = {
	test : 1,
	testFunction : function() {
        document.getElementById('AA').innerHTML = indexobj.test++;
		//console.info('test = ' + indexobj.test++);
		//it's work find
		//console.info('test = ' + this.test++);
		//return NaN
        document.getElementById('BB').innerHTML = this.test++;
		setTimeout(indexobj.testFunction,1000);
	},
}
setTimeout(indexobj.testFunction,1);