Round to 1 decimal place in Javascript (roundup)
var number = 12.3456789;
var rounded = Math.round( number * 10 ) / 10;
// rounded is 12.3
We provide knowledgeable blogs related to php, jQuery, html, css, wordpress, woocommerce, cordova app with examples in 2021.
Comments
Post a Comment