语法高亮,滚动条美化,设置页面调整

This commit is contained in:
fofolee
2019-04-19 02:41:09 +08:00
parent 1e8f76c000
commit 359d29ee0b
1590 changed files with 12328 additions and 11441 deletions

View File

@@ -2,20 +2,20 @@
<div></div>
<p>本次函数调用时传入函数的实参数量.</p>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox">arguments.length</pre>
<pre><code class="language-javascript">arguments.length</code></pre>
<h2 id="Description" name="Description">描述</h2>
<p>arguments.length表示的是实际上向函数传入了多少个参数,这个数字可以比形参数量大,也可以比形参数量小(形参数量的值可以通过<a href="/zh-CN/docs/JavaScript/Reference/Global_Objects/Function/length" title="JavaScript/Reference/Global Objects/Function/length">Function.length</a>获取到).</p>
<h2 id="Examples" name="Examples">例子</h2>
<h3 id="Example:_Using_arguments.length" name="Example:_Using_arguments.length">例子: 使用<code>arguments.length</code></h3>
<p>这个例中,我们定义了一个可以相加任意个数字的函数.</p>
<pre class="brush: js">function adder(base, /*, n2, ... */) {
<pre><code class="language-javascript">function adder(base, /*, n2, ... */) {
base = Number(base);
for (var i = 0; i &lt; arguments.length; i++) {
base += Number(arguments[i]);
}
return base;
}
</pre>
</code></pre>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>