Javascript/.toFixed()

解説 四捨五入小数点指定
sample1
sample1code
function s1Func(){
  var x = 1.254147;
  var y = 1.24484;
  x = x.toFixed(1);
  y = y.toFixed(1);
  console.log(x);
  console.log(y)
}