JSFiddle - React, Tailwind, and code Playground
JavaScript
var height;
var count = 0;
var setHeight = setInterval(function(height) {
count++;
console.log('count');
if ( count > 10)
{
console.log('done');
var height = 20;
clearInterval(setHeight);
}
},100);
console.log('this is the height -> ' + height);