Sollicitatievraag bij Amazon

Can you explain the difference between the Task (Macrotask) Queue and the Microtask Queue in the JavaScript Event Loop? Specifically, how does the browser prioritize Promise resolutions over scheduled callbacks from a setTimeout function, and what impact does this have on UI rendering performance?