I'm new to JavaScript and I came across this code snippet from ExtJS that has me puzzled:
supportsSort = (function() {
var a = [1,2,3,4,5].sort(function(){ return 0; });
return a[0] === 1 && a[1] === 2 && a[2] === 3 && a[3] === 4 && a[4] === 5;
}()),
Could someone explain the purpose of this test in ExtJS?
Can anyone provide some example code snippets related to this topic?