I\'m going to be running document.querySelectorAll() a whole lot, and would like a shorthand alias for it.
var queryAll = document.querySelectorAll queryAll
The JavaScript interpreter throws an error because querySelectorAll() should be invoked in document context.
querySelectorAll()
The same error is thrown when you are trying to call console.log() aliased.
console.log()
So you need to wrap it like this:
function x(selector) { return document.querySelectorAll(selector); }