Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of "Filter Arrays with .filter" updated #10730

Merged
merged 1 commit into from Sep 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -418,7 +418,7 @@
"id": "cf1111c1c15feddfaeb9bdef",
"title": "Filter Arrays with .filter",
"description": [
"The <code>filter</code> method is used to iterate through an array and filter out elements where a given condition is not true.",
"The <code>filter</code> method creates a new array from an existing one by iterating over it and returning only the elements where a given condition returns true.",
"<code>filter</code> is passed a callback function which takes the current value (we've called that <code>val</code>) as an argument.",
"Any array element for which the callback returns true will be kept and elements that return false will be filtered out.",
"The following code is an example of using <code>filter</code> to remove array elements that are equal to five:",
Expand Down