javascript sort string
add comments