[BUGFIX] fix the bug in js for insertion sort.