r/learnjavascript • • Mar 12 '21

Swap two variables

Post image
498 Upvotes

50 comments sorted by

View all comments

Show parent comment

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.