From 03c5ceb6292077f2552b1256f2ea5deb37dc95f4 Mon Sep 17 00:00:00 2001 From: LeviDing Date: Sat, 13 Aug 2022 13:29:06 +0800 Subject: [PATCH] fix: typo --- 1-js/05-data-types/05-array-methods/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/05-data-types/05-array-methods/article.md b/1-js/05-data-types/05-array-methods/article.md index 10409378..feb626f9 100644 --- a/1-js/05-data-types/05-array-methods/article.md +++ b/1-js/05-data-types/05-array-methods/article.md @@ -262,8 +262,8 @@ The method [arr.lastIndexOf](mdn:js/Array/lastIndexOf) is the same as `indexOf`, ```js run let fruits = ['Apple', 'Orange', 'Apple'] -alert( arr.indexOf('Apple') ); // 0 (first Apple) -alert( arr.lastIndexOf('Apple') ); // 2 (last Apple) +alert( fruits.indexOf('Apple') ); // 0 (first Apple) +alert( fruits.lastIndexOf('Apple') ); // 2 (last Apple) ``` ````smart header="The `includes` method handles `NaN` correctly"