diff options
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html')
| -rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html b/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html index 8d3c63aab0..87021c1608 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/array/lastindexof/index.html @@ -22,13 +22,12 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf <dd>被查找的元素。</dd> <dt><code>fromIndex</code> {{optional_inline}}</dt> <dd>从此位置开始逆向查找。默认为数组的长度减 1(<code>arr.length - 1</code>),即整个数组都被查找。如果该值大于或等于数组的长度,则整个数组会被查找。如果为负值,将其视为从数组末尾向前的偏移。即使该值为负,数组仍然会被从后向前查找。如果该值为负时,其绝对值大于数组长度,则方法返回 -1,即数组不会被查找。</dd> - <dd> - <h3 id="返回值">返回值</h3> - - <p>数组中该元素最后一次出现的索引,如未找到返回-1。</p> - </dd> </dl> +<h3 id="返回值">返回值</h3> + +<p>数组中该元素最后一次出现的索引,如未找到返回-1。</p> + <h2 id="Description">描述</h2> <p><code>lastIndexOf</code> 使用<a href="https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Using_the_Equality_Operators">严格相等</a>(strict equality,即 ===)比较 <code>searchElement</code> 和数组中的元素。</p> |
