This is an exract from casperjs JS :
function getPrices() {
var price = document.querySelectorAll('#InvoiceDetailGrid tbody');
return Array.prototype.map.call(price, function(elem) {
return elem.textContent;
});
}
Why use Array.prototype.map.call: wouldn't be possible to use simply:
price.map() ?
pricehas no methodmap…