Number对象的Number.POSITIVE_INFINITY属性表示正无穷大值。
其语法如下
Number.POSITIVE_INFINITY
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var result = Number.POSITIVE_INFINITY; document.write("Positive infinity value: " + result); </script> </body> </html>
输出结果
Positive infinity value: Infinity