setTimeout(() => { console.log('1st callback function'); }, 1000); fetch('https://api.netflix.com').then(() => { console.log('2nd callback Function'); });
These both are the Callback Function but as i heard that setTimeout callback function will go inside the Task queue/Callback queue and fetch Callback function is go inside the Micro Task Queue. so what the reason behind this?
1.4m articles
1.4m replys
5 comments
56.9k users