r/learnjavascript • • Mar 12 '21

Swap two variables

Post image
499 Upvotes

50 comments sorted by

View all comments

64

u/Freekiehsoes Mar 12 '21

But why

2

u/dk1024 Mar 12 '21

This is used in the "array reversal" method for the Leetcode Rotate Array problem I just solved last night.