Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

1 Answer
Samual Sam

The fround() function of the Math object accepts a floating point number and returns the nearest 32-bit single precision float representation of a Number. If the given number itself is an integer this function returns the same.

Syntax

Its Syntax is as follows

Math.fround(160.98)

Example

Live Demo

<html>
   <head>
      <title>JavaScript Example</title>
   </head>
   <body>
      <script type="text/javascript">
         var result = Math.fround(160.98);
         document.write("Fround value: "+result); 
      </script>
   </body>
</html>

Output

Fround value: 160.97999572753906

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.