It's not even right for what the article author is trying to do. Or in other words, s/he just broke their own rule #1: understand "this". "document.querySelectorAll" must be called on the document object, and reassigning it to a variable like this will make it be called in whatever function scope it's currently in. To even get this to call correctly, it needs to be "var $ = document.querySelectorAll.bind(document);"
>> "document.querySelectorAll" must be called on the document object, and reassigning it to a variable like this will make it be called with "this" assigned to the global object, or "undefined" if you're using "use strict"