educative.io

Calling functions on filter

On the lesson of Arrow functions I wanted to call a function instead of but I can’t explain why I need to call my function without ‘( )’ on the filter().

Hi Jesus!
The filter function is being used along with the same function calling convention using paranthesis as you can see here:

  • filter(passed_parameter)student.filter(student => student.present);
  • filter(passed_parameter)student.filter(getpresent);

Hope I’ve cleared answered your query. If you still have any queries please let us know.
Thank you.