I have a question??.Why this function return value is undefined. i don't understand.
Help to solve me please.
I have a question??.Why this function return value is undefined. i don't understand.
Help to solve me please.
Because you're trying to return
from a callback function's scope, which doesn't return to the outer function's scope. This is a pretty common mistake.
You should find another way to write this function so the query functions are in the same scope. Maybe use Promise
s or async
-await
?