math.round js 1 decimal
snippet in javascript

math.round js 1 decimal

user8930

var number = 12.3456789;
var rounded = Math.round( number * 10 ) / 10;
// rounded is 12.3