I wrote my implementation of Hoare\'s partition in JavaScript, so I would like some feedback to see if I can improve something. Ty in advance.
function hoares