code: function isArrSortStable() {
  		var str = "abcdefghijklmnopqrstuvwxyz";
  
  		return "xyzvwtursopqmnklhijfgdeabc" == str.split("").sort(function(a,b) {
  			return ~~(str.indexOf(b)/2.3) - ~~(str.indexOf(a)/2.3);
  		}).join("");
  	}
docs: test if js engine's Array#sort implementation is stable