# Tag Archives: javascript-math

Below is the example of the Number.isNaN() Method. Example: <script> function GFGFun() {   var res = "";   res = res + Number.isNaN(123); document.write(res);      }… Read More
Below is the example of the Math sin() Method. Example: <script type="text/javascript">       document.write("When zero is  passed as a parameter: "                       + Math.sin(0)); </script> Output: When… Read More
Below is the example of the Math min() Method. Example: <script type="text/javascript">      document.write("When  positive numbers are passed"+                     " as parameters: " + Math.min(10, 32, 2));… Read More
Below is the example of the Math max() method.   Example:   javascript <script type="text/javascript">      document.write("When  positive numbers are passed"+                     " as parameters: " + Math.max(10, 32,… Read More
Below is the example of the Math pow() Method. Example: <script type="text/javascript">     document.write(Math.pow(3, 4)); </script> Output: 81 The Math.pow() method is used to power of… Read More
The Math.hypot() function in JavaScript is used to calculate the square root of the sum of squares of numbers passed to it as arguments. It… Read More
While performing operations on numbers we might sometimes want to use 32-bit numbers. JavaScript internally uses 64-bit floating point numbers and not 32-bit. So checking… Read More
Below is the example of the Math trunc() Method. Example: When a positive float number passed as a parameter <script type="text/javascript">          document.write(Math.trunc(15.56));          </script> Output: 15… Read More
Most of the JavaScript Developers use closure consciously or unconsciously. Even if they do unconsciously it works fine in most of the cases. But knowing… Read More
Below is the example of the Math log() Method. Example: <script type="text/javascript">      document.write("When zero is  passed as a parameter: "                       + Math.log(0)); </script> Output: When… Read More