Answer the question
In order to leave comments, you need to log in
Why is the data not being assigned to a variable?
Good afternoon, to be honest, I don’t understand at all why my data is not assigned ... The data is displayed in the console log, but not in the variable, why is that?
let data
connection.query(`SELECT * FROM items`, function (err, results) {
if (err) console.log(err)
data = results
})
connection.end();
console.log(data)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question