Is this closure-safe? i.e., is it possible for only metaNames[nodeList[last].name] = nodeList[last] to end up being bound due to a closure optimization by the browser? metaTag = (function(e) { return nodeList[e]; }(i)); might be safer here, but I don't know, this might already be find. I've seen constructions like these go wrong before, hence the question