Sorting Without Inbuilt Function In Js