After revisiting some snapshots from the recent ng-europe conference, I stumbled upon a slide that appears to showcase snippets of code from Angular 2. You can view it here:
(Source: )
One thing that confuses me is this:
What could be the reason behind the use of
Array.prototype.forEach.call(array, cb)
instead of the shorter and seemingly equivalent version array.forEach(cb)
? My assumption leans towards potential performance impacts.
Is there any other explanation for this discrepancy? Or could my theory about performance be accurate?