javascript float max 2 decimals code example
Example 1: js number 2 decimal places
(3.141596).toFixed(2); // 3.14
Example 2: javascript 2 decimal float array elements
var x = 0;
var len = my_array.length
while(x < len){
my_array[x] = my_array[x].toFixed(2);
x++
}