If I have this code:
const foo = cb => {console.log(cb.name)} //access here
const bar = ()=>null
foo(()=>bar())
Is there a way for me to access bar
's prototype from foo
? (in this case the name)
cb.name // '' (anonymous function)
cb().name // tries to access null.name (return of bar)
This question is more about my curiosity, I'm not looking for workarounds.