Create Tcp Socket Javascript Array Sort Algorithm