Sabtu, 26 Januari 2019

Math.Round() Inwards Javascript

     The Math.round() component subdivision returns the value of a seat out rounded to the nearest integer. If the fractional share of seat out is 0.5 or greater, the declaration is rounded to the adjacent higher integer. If the fractional share of seat out is less than 0.5, the declaration is rounded to the adjacent lower integer.

     Because round() is a static method of Math, you lot ever purpose it equally Math.round(), rather than equally a method of a Math object you lot created (Math has no constructor).

Syntax
    Math.round(number);
Example
 Math.round(19.39);  //19  Math.round(19.7);   //20  Math.round(-19.04); //-19  Math.round(-19.51); //-20


Example Program:- (Editor)


Editor is Loading...

Advertisement

Tidak ada komentar:

Posting Komentar