Array push functions returns the length of the array after pushing.
So, in your code
outPut = outPut.push(strarr[counter + j]);
outPut is now a number, not an array, so the second time through the loop, outPut no longer has a push method.
A simple solution is to change that line to
outPut.push(strarr[counter + j]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…