Category "ecma"

Why does Array.prototype.push return the new length instead of something more useful?

Ever since its introduction in ECMA-262, 3rd Edition, the Array.prototype.push method's return value is a Number: 15.4.4.7 Array.prototype.push ( [ item1 [

How to wait for a JavaScript Promise to resolve before resuming function?

I'm doing some unit testing. The test framework loads a page into an iFrame and then runs assertions against that page. Before each test begins, I create a Pro