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

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

@@ -3,18 +3,18 @@
<p> <code><strong>keys() </strong></code>方法返回一个包含数组中每个索引键的<code><strong>Array Iterator</strong></code>对象。</p>
<div><iframe class="interactive interactive-js" frameborder="0" height="250" src="https://interactive-examples.mdn.mozilla.net/pages/js/array-keys.html" width="100%"></iframe></div>
<h2 id="Syntax" name="Syntax">语法</h2>
<pre class="syntaxbox"><code><var>arr</var>.keys()</code>
</pre>
<pre><code class="language-javascript"><code><var>arr</var>.keys()</code>
</code></pre>
<h3 id="返回值">返回值 </h3>
<p>一个新的 <a href="Reference/Array" title="REDIRECT Array"><code>Array</code></a> 迭代器对象。</p>
<h2 id="Examples" name="Examples">示例</h2>
<h3 id="索引迭代器会包含那些没有对应元素的索引">索引迭代器会包含那些没有对应元素的索引</h3>
<pre class="brush: js">var arr = ["a", , "c"];
<pre><code class="language-javascript">var arr = ["a", , "c"];
var sparseKeys = Object.keys(arr);
var denseKeys = [...arr.keys()];
console.log(sparseKeys); // ['0', '2']
console.log(denseKeys); // [0, 1, 2]
</pre>
</code></pre>
<h2 id="Specifications" name="Specifications">规范</h2>
<table class="standard-table">
<tbody>