Swap two variables without using a third // JavaScript Trick explained ↔️

preview_player
Показать описание
#JavaScript trick to swap two variables ***without*** using a third. A common programming interview question for various languages, solved here for modern JavaScript 🌹

Course Page:

👇 ❤️ Please Subscribe ❤️ 👇

#basarat

**Feel Free To Read This Lot**

I'm Basarat, and I love helping developers. More about me:

Microsoft MVP for TypeScript
200K contributions on Stackoverflow. Top Contributor for TypeScript.
Book Author : Beginning NodeJS
Book Author : TypeScript Deep Dive
Creator of multiple hot ✨ed Github Open Source projects

Рекомендации по теме
Комментарии
Автор

Nice, I never knew you could use destructuring with existing variables

avi
Автор

Not possible with older versions....well how about

beta = [alpha, (alpha =beta)][0];

smartvivek
Автор

You don't believe me I exactly thought of same thing after seeing thumbnail

tkdevlop
join shbcf.ru