' Math.ceil(x)restituisce il valore di x arrotondato fino al suo intero piu' vicino:
https://www.w3schools.com/js/tryit.asp?filename=tryjs_math_ceil <!DOCTYPE html> <html> <body> <h2>JavaScript Math.ceil()</h2> <p>Math.ceil() rounds a number <strong>up</strong> to its nearest integer:</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Math.ceil(4.4); </script> </body> </html> |