mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-02-28 10:03:04 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -40,11 +40,11 @@
|
||||
<p>You might use the <code>Number.POSITIVE_INFINITY</code> property to indicate an error condition that returns a finite number in case of success. Note, however, that <a href="Reference/Global_Objects/isFinite" title="该全局 isFinite() 函数用来判断被传入的参数值是否为一个有限数值(finite number)。在必要情况下,参数会首先转为一个数值。"><code>isFinite</code></a> would be more appropriate in such a case.</p>
|
||||
<h2 id="示例">示例</h2>
|
||||
<p>下例中,赋值给变量 <code>bigNumber</code> 一个大于 JavaScript 中最大值的值。当 <code>if</code> 语句执行时,变量 <code>bigNumber</code> 值为 "<code>Infinity</code>", 因此在继续执行代码前,为变量 <code>bigNumber</code> 设置一个容易管理的值。</p>
|
||||
<pre class="brush: js">var bigNumber = Number.MAX_VALUE * 2
|
||||
<pre><code class="language-javascript">var bigNumber = Number.MAX_VALUE * 2
|
||||
if (bigNumber == Number.POSITIVE_INFINITY) {
|
||||
bigNumber = returnFinite();
|
||||
}
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="规范">规范</h2>
|
||||
<table class="standard-table">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user