JSFiddle - React, Tailwind, and code Playground
HTML
<div id='output'></div>
JavaScript
function roundPenny(pendantCost){
var original = pendantCost;
// round 'original' to two decimals
var result = Math.round(original*100/100);
return result;
}
// Test it
pendantCost = roundPenny(6.5555);
$('#output').html(pendantCost);