JSFiddle - React, Tailwind, and code Playground
HTML
<div class="percent">
9
</div>
JavaScript
$('.percent').each(function() {
var monetary_value = $(this).text();
if ($.isNumeric(monetary_value) && (monetary_value < 100 || monetary_value.length == 2)) {
var i = new Intl.NumberFormat('en-IN', {
style: 'currency',
currency: 'INR'
}).format(monetary_value);
}
$(this).text(i);
});