Future Javascript: Built in function composition (pipeline operator)

Future Javascript: Built in function composition (pipeline operator)

function composition is a way of combining multiple function to build more complicated one you can define your own compose function :

one.png

two.png

or you can use a third party library like lodash i usually use "_.flow()" method but now when i read about pipeline operator . i'm so exited to implemented on my work but this proposal on stage 2 (experimental phase) we should wait 2 more stage until the official release . i can't wait all that time so i used a polyfill to test it : this is the link of this proposal to read more about it :[github.com/tc39/proposal-pipeline-operator]

so now let's dive in my best new feature until now : pipeline operator|> let do the same example of compose function :

code.png

we pass 10 to the addition function and then we pass the result of addition function to subtraction function and % represent the argument of the function

"that's all I've got. Goodbye." at least for now because i kinda enjoying writing blogs so let's meet in another blog