Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js-tasks/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Аналог из lodash: http://lodash.com/docs#filter В новых браузерах у массивов есть метод filter.

// --- Solution ---

//тут надо поменять
function filter(arr, fn) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to write here your own filter method, don't use the existing)

let result = arr.filter(function(n){return fn(n)});

Expand Down