ToExponential-2

 

ToExponential converts provided number to an exponential notation

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