aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/array/length
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:14:18 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitd44f5032d0f53256b2d5aef505d6b593fd3cd158 (patch)
tree4b585f4be9c9a2712664ad10e7acf62c83fff51f /files/zh-cn/web/javascript/reference/global_objects/array/length
parentf45e9e070c93ebbd83d488bdd775987a4d75c201 (diff)
downloadtranslated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.gz
translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.tar.bz2
translated-content-d44f5032d0f53256b2d5aef505d6b593fd3cd158.zip
fix yari h2m dry run errors (zh-CN)
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/array/length')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/array/length/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html
index 1ee4198226..6731fc1d14 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/array/length/index.html
@@ -82,7 +82,7 @@ function printEntries(arr) {
<p>下面的例子中,通过数组下标遍历数组元素,并把每个元素的值修改为原值的2倍。</p>
-<pre class="brush: js line-numbers language-js">var numbers = [1, 2, 3, 4, 5];
+<pre class="brush: js">var numbers = [1, 2, 3, 4, 5];
var length = numbers.length;
for (var i = 0; i &lt; length; i++) {
numbers[i] *= 2;
@@ -93,7 +93,7 @@ for (var i = 0; i &lt; length; i++) {
<p>下面的例子中,如果数组长度大于 3,则把该数组的长度截断为 3 。</p>
-<pre class="brush: js line-numbers language-js">var numbers = [1, 2, 3, 4, 5];
+<pre class="brush: js">var numbers = [1, 2, 3, 4, 5];
if (numbers.length &gt; 3) {
numbers.length = 3;