JSFiddle - React, Tailwind, and code Playground
by Radhika Magaji
HTML
<body>
<div id="demo">hello
</div>
</body>
JavaScript
var regPrice = 255,000;
var disPrice = 5,000
var reg=parseInt(regPrice.replace(",",""));
var discount=parseInt(disPrice.replace(",",""));
var Pointsdiff = (regPrice.replace(",",""))-(disPrice.replace(",",""));
document.getElementById("demo").innerHTML = 255,000;
var insert = ",";
var position = 3;
var resultPointsdiff = [Pointsdiff.slice(0, position), insert, Pointsdiff.slice(position)].join('');
$('#area').html('<span class="strike">' + bookObject.reservationResponse.tripSummary.regularPrice + '</span>'
+ " " + resultPointsdiff + " Points");
//alert("resultPointsdiff");
}else{
$('#area').html(reg1 + " Points");
}