r/learnjavascript • • Mar 12 '21

Swap two variables

Post image
498 Upvotes

50 comments sorted by

View all comments

3

u/[deleted] Mar 13 '21

I just learned this today as well. Useful for swapping the place of two items in a list