&gt;The toString trick is pretty outdated, in ES5 you can also do:<p>&gt; thing instanceof Array<p>instanceof is ES3.<p>&gt; 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.<p>To quote MDC:<p>&gt; The for each...in statement is deprecated as the part of ECMA-357 (E4X) standard. E4X support has been removed, but for each...in will not be disabled and removed because of backward compatibility considerations. Consider using for...of instead. (Please refer to bug 791343.)