&gt; The variable has to be in the local scope and can&#x27;t be in any higher or lower scope, not just a global scope (which your words acknowledge, but your code snippet doesn&#x27;t)<p>Sure! I am just trying to say that in my opinion whenever you have a non-local variable used as iteration variable in for-in then you most probably have a bug in your code. I tried to illustrate this with an global variable example because it&#x27;s a common source of JS bugs - when people leak things into a global namespace by accident.<p>&gt; Some real world examples[0][1][2]<p>These links refer to a different bailout reason --- &quot;ForIn is not fast case&quot;. The original ForIn support in Crankshaft (written coincidentally by me) only supported this kind of for-in because it was the important case to support and the one where you can get good performance with reasonable investment of time.<p>Given time and bug reports from people hitting this bailout I would certainly extend ForIn support to cover a more generic case (assuming that supporting more generic case would make some code faster), however just in a couple of months after I landed this initial support I switched to a different project, so I never had chance to revisit this.<p>This bailout reason is actually not in V8 anymore - as now V8 supports both fast and slow cases in Crankshaft[1]<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;v8&#x2F;v8&#x2F;blob&#x2F;master&#x2F;src&#x2F;crankshaft&#x2F;hydrogen.cc#L5318-L5349" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;v8&#x2F;v8&#x2F;blob&#x2F;master&#x2F;src&#x2F;crankshaft&#x2F;hydrogen...</a>