JSFiddle - React, Tailwind, and code Playground

by Kirubel Girma

HTML

<input type="number" id="numCom">

JavaScript

function numberWithCommas(x) {
    return x.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ",");
}

function TextChanged(){
		
}
document.getElementById("numCom").addEventListener("change", );