I'll directly give an example
if I wrote this
function say(word){
console.log('word');
}
var func1 = say('hello');
console.log(func1());
I want to recieve: hello
You need to return a function to call it,
const say = (word) => () => word
const func1 = say('Hello')
console.log(func1())