Number.prototype
Numberオブジェクトにプロトタイプを追加します。
構文
Number.prototype
例文
<html> <head> <title>Number.prototype</title> </head> <body> <script type="text/javascript"><!-- n = new Number(2.15); Number.prototype.birthday = "My Brithday"; document.write(n.birthday); // --></script> </body> </html>
関連記事
- Number.toPrecision
- Number.toFixed
- Number.toExponential
- Number.NaN
- isNaN
- Number.toString
- Number.POSITIVE_INFINITY
- Number.NEGATIVE_INFINITY
- Number.MIN_VALUE
- Number.MAX_VALUE
スポンサーリンク