JSFiddle - React, Tailwind, and code Playground

by Mert Ener

HTML

<div id="result"></div>

JavaScript

;
var n=0,i=1,b=1;
setInterval(function(){
    n+=4/i*b;
    document.getElementById("result").innerText=n;
    b*=-1
    i+=2},0.001);