Is there a way for Fn1 to access the parameter "foo" in the code snippet using closure without adding a new parameter in Fn3?
const Fn1 = (txt) => {
console.log(txt);
}
const Fn3 = (fn, num) => {
return () => {
fn(); // undefined
console.log(num) // 7
}
}
const Fn2 = Fn3(Fn1, 7);
Fn2("foo"); // undefined, 7