Cpp Sort Array Javascript Length Of Text