ToFixed-1

 

ToFixed-1

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <button onclick="convertToFixed()">Display the fixed number</button> <p id="sample"></p> <script> function convertToFixed() { var num = 6.76549; var exp = num.toFixed(3); document.getElementById("sample").innerHTML = exp; } </script> </body> </html>
Output