Tag: javascript

Total 82 Posts

Sorting Arrays in JavaScript

Like many other popular languages, JavaScript conveniently comes with a built-in method for sorting arrays. While the end result is the same, the various JavaScript engines implement this method using different sort algorithms:

  • V8: Quicksort or Insertion Sort (for smaller arrays)
  • Firefox: Merge sort
  • Safari: Quicksort, Merge Sort, or Selection
Continue Reading