Definitely, you must have seen it or something similar. These kinds of functions are called "High-order Functions" in JavaScript. What are high Order Functions? These are functions that operate on other functions, either by taking them as arguments ...
Markdown supported · ⌘↵ to post
Osinachi Chukwujama
Web developer + Technical Writer
Thank you for sharing your knowledge.
I still haven't understood why this currying approach is considered. I think it's easier to destructure the parameters like this
const checkBankDetails({ username, userNameRegex, acctNumber, acctNumberRegex }) => {}It gives more flexibility on how the function should be called. But apart from that, thank you for writing this blog.