Add insertsort algorithm js version