javascript compare strings lexicographically