Can I make built-in functions return additional properties?
For example if I call querySelectorAll, can I somehow make the return value contain a desired property (the last element) ?
Instead of:
var elements = document.querySelectorAll('span');
var last = elements[elements.length - 1];
I want to do:
document.querySelectorAll('span').lastElement