O'Reilly logo
  • Jenny Tien thinks this is interesting:

if (i <= j) { //{14}


Cover of Learning JavaScript Data Structures and Algorithms - Second Edition


Probably missing something though it's unclear why you would actually perform the swap when the indexes are equal. Seems like you can just increment the indexes and skip the swap.