Livejournal
Log in
Post
Friends
My journal
blake8086
????
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
}
Leave a comment
Previous post
Next post
Up