This method will convert a number into an exponential notation.
Syntax
Code:-
<!DOCTYPE html>
Syntax
number.toExponential(integer)
Code:-
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- </head>
- <body>
- <h1>toExponential()</h1>
- <input type="button" onclick="fun_exp();" value="toExponential(5)">
- <script>
- function fun_exp()
- {
- var n1 = 46.52;
- alert(n1.toExponential(5));
- }
- </script>
- </body>
- </html>
To Exponential in JavaScript:- Geniusofstudent
Reviewed by Network security
on
July 02, 2019
Rating:
No comments: