????

Feb 06, 2008 16:24

Today I got to legitimately use a quad ternary operator

sortFunction = function(a,z) {
return a.last > z.last ? 1 : a.last < z.last ? -1 : a.first > z.first ? 1 : a.first < z.first ? -1 : 0
}
Previous post Next post
Up