Arrays Sort Lambda Function Javascript Code