JSFiddle - React, Tailwind, and code Playground

by twobomb three

JavaScript

var a = "0.000000009000000000";
a = a.replace(/0*$/,"");
alert(a)