How to use extra small number in JavaScript:- Geniusofstudent


Extra large or extra small numbers can be written with scientific (exponent) notation.



Code:-

  • <!DOCTYPE html> 
    1. <html> 
    2.  
    3. <head> 
    4.  <meta name="viewport" content="width=device-width, initial-scale=1"> 
    5. </head> 
    6.  
    7. <body> 
    8.  
    9.  <h1>Extra Number</h1> 
    10.  
    11.  <input type="button" onclick="exnumber();" value="Get Answer"> 
    12.  
    13.  <script> 
    14.   function exnumber() 
    15.   { 
    16.    var n1 = 569e10; 
    17.    var n2 = 32e-5; 
    18.  
    19.    alert(n1); //add extra zero on righ side 
    20.    alert(n2); //add extra zero on left side 
    21.   } 
    22.  </script> 
    23.  
    24. </body> 
    25.  
    26. </html>
    How to use extra small number in JavaScript:- Geniusofstudent How to use extra small number in JavaScript:- Geniusofstudent Reviewed by Network security on July 02, 2019 Rating: 5

    No comments:

    Useful Information

    Powered by Blogger.