JSFiddle - React, Tailwind, and code Playground

HTML

<span id="badge">0</span>

JavaScript

$.fn.increment= function(options) {

 var $this = $(this);

 var coef = options.coef;

 var speed = options.speed;

 var value = 0;

 setInterval(function(){ 

    value = value + coef ;

    $this.html(value);

 }, speed);

};
$(document).ready(function(){

	$("#badge").increment({coef: 1, speed:1000});

});