Using Array.sort() method to sorted array of string etc. 1.2.3 , 1.1.1.1 , 2.5 , 2.3.9 , 1.6