JSFiddle - React, Tailwind, and code Playground

JavaScript

var x = "2,299.00";
x = x.replace(/[^\d\.]/g, "");
x = parseFloat(x);
alert(x);