diff options
-rw-r--r-- | files/ru/web/javascript/reference/global_objects/array/filter/index.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/ru/web/javascript/reference/global_objects/array/filter/index.md b/files/ru/web/javascript/reference/global_objects/array/filter/index.md index 94bc6b25cf..b45dde40b5 100644 --- a/files/ru/web/javascript/reference/global_objects/array/filter/index.md +++ b/files/ru/web/javascript/reference/global_objects/array/filter/index.md @@ -179,8 +179,8 @@ const filterItems = (arr, query) => { return arr.filter(el => el.toLowerCase().indexOf(query.toLowerCase()) !== -1) } -console.log(filterItems('ap')); // ['apple', 'grapes'] -console.log(filterItems('an')); // ['banana', 'mango', 'orange'] +console.log(filterItems(fruits, 'ap')); // ['apple', 'grapes'] +console.log(filterItems(fruits, 'an')); // ['banana', 'mango', 'orange'] ``` ### Модификация изначального массива (изменение, добавление и удаление) |