Quicksort implementation in JavaScript I implemented Quicksort in JavaScript. I'm trying to follow the best principles in JavaScript. In Ruby when you declare classes your able to use private  for the methods that are private. I don't think there is anything like that in JavaScript.
class QuickSort {
  sort(a) {
    a = this.shuffle(a); //Shuffling is needed for perfomance guarantee.
    this.privateSort(a,0, a.length - 1)
    return a;
  }

  privateSort(a, lo, hi) {
    if(hi &lt;= lo) { return }
    let j = this.partition(a, lo, hi);
    this.privateSort(a, lo, j - 1)
    this.privateSort(a, j + 1, hi)
  }

  partition(a, lo, hi) {
    let i = lo;
    let j = hi + 1;
    let v = a[lo];

    while (true) {
      while (a[++i] &lt; v) {
        if (i &gt;= hi) { break; };
      }
      while (v &lt; a[--j]) {
        if (j &lt;= lo) { break; };
      }
      if (i &gt;= j) { break; }
      this.swap(a, i, j);
    }
    this.swap(a, lo, j);
    return j;
  }

  swap(a, firstEl, secondEl) {
    let temp = a[firstEl];
    a[firstEl] = a[secondEl];
    a[secondEl] = temp;
    return
  }

  // Knuth-Fisher-Yates shuffle algorithm
  shuffle(arr) {
    for (var i = arr.length - 1; i &gt; 0; i--) {
      const swapIndex = Math.floor(Math.random() * (i + 1))
      const currentEl = arr[i]
      const elToSwap  = arr[swapIndex]

      arr[i] = elToSwap;
      arr[swapIndex] = currentEl;
    }
    return arr;
  }
}

I'm also thinking of adding a method to verify input, make sure input is array, not nil, etc. Ideas for how I can go about implementing such method are welcome.
Is there anything I can improve, are there principles being violated? Am I following best practices in class implementation in JavaScript.
here is a test:
var obj = new QuickSort();
sample = obj.sort(sample);
console.log(sample)
I'm pretty sure the js convention is still to prefix &quot;private&quot; stuff with an underscore.
class QuickSort {
  sort(a) {...}
  _sort(a, lo, hi) {...}
  ...}

The only other thing that sticks out to me is your use of ++ and -- in the while loops. While perfectly idiomatic, I think it would express the logic better to move both conditionals together in the while(condition), and the increment action into the while's body. Of course it's always nice if one can abstract away a loop altogether...
Other people can speak more specifically about javascript than I can.