Ever since its introduction in ECMA-262, 3rd Edition, the Array.prototype.push method\'s return value is a Number:
I posted this in TC39's communication hub, and was able to learn a bit more about the history behind this:
push,pop,shift,unshiftwere originally added to JS1.2 (Netscape 4) in 1997.There were modeled after the similarly named functions in Perl.
JS1.2 push followed the Perl 4 convention of returning the last item pushed. In JS1.3 (Netscape 4.06 summer 1998) changed push to follow the Perl 5 conventions of returning the new length of the array.
see https://dxr.mozilla.org/classic/source/js/src/jsarray.c#804
/* * If JS1.2, follow Perl4 by returning the last thing pushed. Otherwise, * return the new array length. */