js: merge sort with console logged process