JSFiddle - React, Tailwind, and code Playground
JavaScript
cm = 14*2.55;
outputCMVal = Math.round(cm*10)/10;
alert(outputCMVal);
arrDecimal = outputCMVal.split('.');
alert(arrDecimal[1]);
cm = 14*2.55;
outputCMVal = Math.round(cm*10)/10;
alert(outputCMVal);
arrDecimal = outputCMVal.split('.');
alert(arrDecimal[1]);