Javascript round after the decimal point

Solved
cap Posted messages 57 Status Membre -  
 Thomas -
Hello,
I'm looking for a JavaScript function that can round a number after the decimal point...
in a classic way... if the digit after the decimal is less than 5, we return the lower integer, and if the digit after the decimal is 5 or greater, we return the upper integer:
2.4 ==>2
2.5 ==>3

does anyone know a function that can do this??
thank you in advance

2 réponses

Thomas
 
Math.round()
2