JavaScript Promise.resolve() Unexpected Behaviour 🤯🤯
Автор: M Saqib Khan
Загружено: 2025-11-30
Просмотров: 219
Описание:
Most developers believe Promise.resolve() executes whatever we pass into it… but here’s the twist 🤯
If you pass a function to Promise.resolve(), it doesn’t run the function — it simply resolves the function itself!
This tiny detail can completely change the way you understand Promises in JavaScript.
In this video, I break down:
✔️ Why Promise.resolve() doesn’t execute your function
✔️ What it actually resolves
✔️ How to get the expected result
✔️ A real example that shocks most JavaScript developers 😳
If you’re learning async JavaScript, this is a MUST-KNOW concept.
Hit LIKE, COMMENT your thoughts, and SUBSCRIBE for more quick JS mind-benders! ⚡
#javascript #promise #promises #asyncawait #webdevelopment #frontenddeveloper #jsfacts #codingtutorial #learnjavascript #javascripttricks #developerlife #codewithsaqib #msaqibkhan #saqibkhan #programmingtips #webdev #reactjs #softwaredeveloper
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: