Number-2

 

In this example, Number.MAX_VALUE will print the maximum value of number. See the code snippet:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <button onclick="largestNumber()">Show the largest number</button> <p id="sample"></p> <script> function largestNumber() { document.getElementById("sample").innerHTML = Number.MAX_VALUE; } </script> </body> </html>
Output