Hello i'm new in node js and I definitly need help
Here i need to have access to the result query for a for loop after this but my variable firstresult don't change outside the query loop.
How can i do it ?
db.query("SELECT * FROM film", function (err, result) {
if (err) throw err;
firstresult=result
});
console.log(firstresult) ///AFFICHE undefined```