It is set
Imagine the query takes 10 seconds
getOptions() { // 2. (0s) this runs second let result; // 3. (0s) query runs third query(..., (res) => { // 6. (10s) This runs sixth result = res; }); // 4. (0s) this runs fourth return result; } // 1. (0s) getOptions runs first // 5. (0s) console.log runs fifth console.log(getOptions());
What happens if I do: getOptions(" '; DROP TABLE `options`; SELECT ' ");
Обсуждают сегодня