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

Filter: Rewrite double negative #10695

Closed
dogweather opened this issue Sep 11, 2016 · 7 comments
Closed

Filter: Rewrite double negative #10695

dogweather opened this issue Sep 11, 2016 · 7 comments
Labels
first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. help wanted Open for all. You do not need permission to work on these.

Comments

@dogweather
Copy link

dogweather commented Sep 11, 2016

Challenge Filter Arrays with filter has an issue.

The intro sentence uses a double negative:

The filter method is used to iterate through an array and filter out elements where a given condition is not true.

I suggest re-writing in the positive because it's easier to read and understand. Also, it's how I happen to think of filter, and maybe others do too. Here I made that change, plus removed "filter" from its own definition, and changed it from passive to active voice:

The filter method iterates through an array and selects elements where a given condition is true.

@erictleung
Copy link
Member

@dogweather I would amenable to this change.

@FreeCodeCamp/issue-moderators second opinions?

@erictleung erictleung added the status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. label Sep 13, 2016
@justincorrigible
Copy link
Member

"And keep only the elements where a given condition returns true" or something along those lines, maybe?

@dhcodes
Copy link
Contributor

dhcodes commented Sep 13, 2016

"The filter method is used to create a new array by iterating through the array it is called upon and keeping only elements where a given condition returns true."

I think it's important to know that .filter() makes a new array.

@justincorrigible
Copy link
Member

Oh yeah... I was merely referring to the double negative part of the whole thing.

@dogweather
Copy link
Author

dogweather commented Sep 13, 2016

I like the addition of creating a new array. How about in active voice:

"filter creates a new array from an existing one by iterating over it and returning only the elements where a given condition returns true."

This is kind of a long sentence, though. Also returning is more correct than keeping, but might be confusing to someone new to this.

cc: @risachi

@dhcodes
Copy link
Contributor

dhcodes commented Sep 14, 2016

Fine by me @dogweather. Let's not wordsmith this to death 👍

@dhcodes dhcodes added help wanted Open for all. You do not need permission to work on these. confirmed first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. and removed status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. labels Sep 14, 2016
@theshubhamp-zz
Copy link
Contributor

I am working on this issue. Will send a PR across :)

rarmatei pushed a commit to rarmatei/freeCodeCamp that referenced this issue Sep 3, 2017
Fixes issue freeCodeCamp#10695
The description of the challenge "Filter Arrays with .filter" was updated to remove double negatives from the description as pointed out in the issue freeCodeCamp#10695
mhatout pushed a commit to mhatout/freeCodeCamp that referenced this issue Feb 9, 2018
Fixes issue freeCodeCamp#10695
The description of the challenge "Filter Arrays with .filter" was updated to remove double negatives from the description as pointed out in the issue freeCodeCamp#10695
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. help wanted Open for all. You do not need permission to work on these.
Projects
None yet
Development

No branches or pull requests

6 participants