Time Complexity Of Insertion Sort Algorithm In Javascript