In javascript ot jqueryMath.round()” is used to round the number to the nearest integer. If the decimal part is .5 or higher, the number is rounded up else decimal part is truncated.
See examples below:

  1. document.write( Math.round(7.4) ); // writes 7
  2. document.write( Math.round(7.5) ); // writes 8
  3. document.write( Math.round(-7.5) ); // writes -7
  4. document.write( Math.round(-7.6) ); // writes -8