I found that a neat way to convert an array-like object (e.g. NodeList, Arguments) into a real array is to use:
Array.prototype.slice.call(...);
Then, I thought of a way to shorten this syntax:
[].slice.call(...);
Would the latter method waste time and/or memory by creating a new array each time that it is called? Should I avoid this syntax in complexity-essential applications, or do JavaScript engines optimise this out?