Test case details

Preparation Code

var a = 2345.5665,         period = 2,         c,         b;

Test cases

Test #1

c = Math.pow(10, period) b = Math.round(parseInt(a * c)) / c;

Test #2

b = +a.toFixed(period)