mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-17 16:34:32 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<article id="wikiArticle">
|
||||
<div></div>
|
||||
<h2 id="信息">信息</h2>
|
||||
<pre class="syntaxbox">RangeError: repeat count must be less than infinity and not overflow maximum string size (Firefox)
|
||||
<pre><code class="language-javascript">RangeError: repeat count must be less than infinity and not overflow maximum string size (Firefox)
|
||||
|
||||
RangeError: Invalid count value (Chrome)
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="错误类型">错误类型</h2>
|
||||
<p><a href="Reference/Global_Objects/RangeError" title="RangeError对象标明一个错误,当一个值不在其所允许的范围或者集合中。"><code>RangeError</code></a></p>
|
||||
<h2 id="发生了什么">发生了什么?</h2>
|
||||
@@ -12,15 +12,15 @@ RangeError: Invalid count value (Chrome)
|
||||
<p><span class="short_text" id="result_box" lang="zh-CN"><span>其结果字符串也不能长于最大字符串,不同 JavaScript 引擎中可能有所不同。</span></span> 在 Firefox (SpiderMonkey) 里最大字符串大小为 2<sup>28</sup> -1 (<code>0xFFFFFFF</code>)。</p>
|
||||
<h2 id="示例">示例</h2>
|
||||
<h3 id="无效的">无效的</h3>
|
||||
<pre class="brush: js example-bad">'abc'.repeat(Infinity); // RangeError
|
||||
<pre><code class="language-js example-bad">'abc'.repeat(Infinity); // RangeError
|
||||
'a'.repeat(2**28); // RangeError
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h3 id="有效的">有效的</h3>
|
||||
<pre class="brush: js example-good">'abc'.repeat(0); // ''
|
||||
<pre><code class="language-js example-good">'abc'.repeat(0); // ''
|
||||
'abc'.repeat(1); // 'abc'
|
||||
'abc'.repeat(2); // 'abcabc'
|
||||
'abc'.repeat(3.5); // 'abcabcabc' (count will be converted to integer)
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="See_also">See also</h2>
|
||||
<ul>
|
||||
<li><a href="Reference/Global_Objects/String/repeat" title="repeat() 构造并返回一个新字符串,该字符串包含被连接在一起的指定数量的字符串的副本。"><code>String.prototype.repeat()</code></a></li>
|
||||
|
||||
Reference in New Issue
Block a user