Sorting Array Of Object Javascript Methods Syntax