Skip to content
Advertisement

how to return in connection.query

I have a problem… I wanted to return “A” but The result was “B” I don’t know what to do Please help me

my code:

JavaScript

My results

JavaScript

Advertisement

Answer

You are mixing here callback with promises. To reach what you want, wrap your function in a promise:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement