Thanks for your article! I too really like those cool little Array.prototype methods.
May I suggest another name for the FilterFn function, which is upper-camel-cased. Usually we write functions following the lower-camel-case conventions.
Of course this is non-blocking when writing code but if you are going on the readability path, you may want to convert this code and use this convention for your function names!
Another thing I noticed is the name of the function itself. I guess isModuloTwo is more self-explanatory than FilterFn since you may want to re-use this function elsewhere in your code.
Finally, suffixing all your functions with Fn is overkill. If you follow the above convention and some others, you'll easily identify functions, classes, constants, etc...
I totally agree your point. It is very important to name the functions right to express the intention of the function. In fact that is my next piece of topic I'm writing. watch out for that :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for your article! I too really like those cool little
Array.prototype
methods.May I suggest another name for the
FilterFn
function, which is upper-camel-cased. Usually we write functions following the lower-camel-case conventions.Of course this is non-blocking when writing code but if you are going on the readability path, you may want to convert this code and use this convention for your function names!
Another thing I noticed is the name of the function itself. I guess
isModuloTwo
is more self-explanatory thanFilterFn
since you may want to re-use this function elsewhere in your code.Finally, suffixing all your functions with
Fn
is overkill. If you follow the above convention and some others, you'll easily identify functions, classes, constants, etc...I totally agree your point. It is very important to name the functions right to express the intention of the function. In fact that is my next piece of topic I'm writing. watch out for that :)