Custom Array Filter higher-order function
A few lines code on the picture show how to make custom higher-order function in JavaScript. New myFilter method is declared in Array prototype and contains function with an argument as callback function. In function, in condition, three arguments is sent into callback function. If condition is true, checked item is pushed into newArray. Eventually, the function return newArray.