Ken,
  I made the change exactly as prescribed.  I think your version is a lot more concise and understandable.  This is one part of javascript I am very weak on, namely embedding a function within a function for things like filtering operations.  This is probably the root cause of the sort() issues I am facing.  I see that you are using "filter" on an array, which will ultimately return an array and then you call the "length" method on the returned array.  You defined filter as "return card.returnRank() == rank".  I cannot think like this as of yet.