ToExponential-1

 

ToExponential function convert a number to an exponential notation

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <button onclick="convertToExponential()">Display the exponential notation</button> <p id="sample"></p> <script> function convertToExponential() { var num = 6.76789567; var result = num.toExponential(); document.getElementById("sample").innerHTML = result; } </script> </body> </html>
Output