DEV Community

Discussion on: What Makes Your Code More Readable I

Collapse
 
sschneiderihrepvs profile image
sschneider-ihre-pvs • Edited
function swap(left, right) {
  [right, left] = [left, right]
}
Enter fullscreen mode Exit fullscreen mode

;)

Collapse
 
shoki profile image
Shoki Ishii

You're right, that is easier to recognize it is a swap! Thank you so much for sharing this!