Basically I want to build a function which sorts objects in an array by one of the object\'s properties/member variables. I am preeeety sure that the comparator function is wher
There are multiple problems with your comparator:
task
Try:
var compareFN = function(a, b) { return a.priority - b.priority; }