funzione per arrotondare javascript code example
Example: js arrotondare numeri
var a = Math.round(2.3); // a is now 2
var b = Math.round(2.7); // b is now 3
var c = Math.round(2.5); // c is now 3
var a = Math.ceil(2.3); // a is now 3
var b = Math.ceil(2.7); // b is now 3
Input : Math.floor(5.78)
Output : 5
Input : Math.floor(1.5)
Output : 1