javascript
使用JavaScript中的示例编号MAX_VALUE属性
數字MAX_VALUE屬性 (Number MAX_VALUE Property)
MAX_VALUE Property is a Number property in JavaScript and it is used to get the maximum value of a number that is possible in JavaScript.
MAX_VALUE屬性是JavaScript中的Number屬性,用于獲取JavaScript中可能的數字最大值。
Syntax:
句法:
Number.MAX_VALUE;Note: MAX_VALUE property is called with the "Number", we cannot use this property with a variable. If we use MAX_VALUE with a variable – it returns "undefined".
注意: MAX_VALUE屬性用“ Number”調用,我們不能將此屬性與變量一起使用。 如果我們將MAX_VALUE與變量一起使用–它返回“ undefined” 。
Examples:
例子:
Input: Number.MAX_VALUEOutput:1.7976931348623157e+308Code:
碼:
<html> <head> <title>JavaScipt Example</title> </head> <body> <script>document.write("Max. Value: " + Number.MAX_VALUE + "<br>");//testing with variablevar num = 123;document.write("num.MAX_VALUE: " + num.MAX_VALUE + "<br>"); </script> </body> </html>Output
輸出量
Max. Value: 1.7976931348623157e+308 num.MAX_VALUE: undefined翻譯自: https://www.includehelp.com/code-snippets/number-MAX_VALUE-property-with-example-in-javascript.aspx
總結
以上是生活随笔為你收集整理的使用JavaScript中的示例编号MAX_VALUE属性的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 鱼跃制氧机多少钱啊?
- 下一篇: “昌会溢民讴”下一句是什么