To Exponential in JavaScript:- Geniusofstudent

This method will convert a number into an exponential notation. 

Syntax
number.toExponential(integer)


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.  <h1>toExponential()</h1> 
    9.  
    10.  <input type="button" onclick="fun_exp();" value="toExponential(5)"> 
    11.  
    12.  <script> 
    13.   function fun_exp() 
    14.   { 
    15.    var n1 = 46.52; 
    16.    alert(n1.toExponential(5)); 
    17.   } 
    18.  </script> 
    19.  
    20. </body> 
    21.  
    22. </html>
    To Exponential in JavaScript:- Geniusofstudent To Exponential in JavaScript:- Geniusofstudent Reviewed by Network security on July 02, 2019 Rating: 5

    No comments:

    Useful Information

    Powered by Blogger.