&gt; Checking whether a passed argument is an array or a dict<p>Luckily solved in ES2015:<p>Array.isArray(thing)<p>The toString trick is pretty outdated, in ES5 you can also do:<p>thing instanceof Array<p>&gt; (perhaps not js itself, but how it is used) Leaking DOM nodes are a thing<p>Definitely not JS itself, it&#x27;s easy to create circular references between JS objects and DOM elements. It&#x27;s just the way the DOM is (poorly) designed and the way it interacts with JS.<p>&gt; for each (var myVar in myObject)<p>That&#x27;s not even standard, just a Mozilla &quot;dialect&quot;. I don&#x27;t think that&#x27;s supported by any engines other than SpiderMonkey and predecessors.