<p dir="auto">The <code class="notranslate">es6.forOf</code> transformer is enabled by default, yet code containing <code class="notranslate">for (x of y) ...</code> will not function unless the "polyfill" runtime library is enabled. This is due to the fact that for-of code generates use of Symbol, which is not provided by babel helpers, thus is undefined. The documentation does not mention this fact (<a href="http://babeljs.io/docs/learn-es6/#iterators-for-of" rel="nofollow">http://babeljs.io/docs/learn-es6/#iterators-for-of</a>) (no "Support via polyfill" note.)</p>
<p dir="auto"><strong>Suggestion:</strong> Make forOf optional and add "Support via polyfill" note to documentation, or introduce "Symbol" inline helper to remove dependency on "polyfill."</p>
<blockquote>
<p dir="auto">Note: <a href="https://github.com/termi/es6-transpiler">es6-transpiler</a> does support for-of via inline helpers.</p>
</blockquote>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="for (x of y) {}"><pre class="notranslate"><span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">x</span> <span class="pl-k">of</span> <span class="pl-s1">y</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">Generated: (note use of <code class="notranslate">Symbol.iterator</code>)</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;

try {
  for (var _iterator = y[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
    x = _step.value;
  }
} catch (err) {
  _didIteratorError = true;
  _iteratorError = err;
} finally {
  try {
    if (!_iteratorNormalCompletion &amp;&amp; _iterator[&quot;return&quot;]) {
      _iterator[&quot;return&quot;]();
    }
  } finally {
    if (_didIteratorError) {
      throw _iteratorError;
    }
  }
}"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>

<span class="pl-k">var</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span>

<span class="pl-k">try</span> <span class="pl-kos">{</span>
  <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_iterator</span> <span class="pl-c1">=</span> <span class="pl-s1">y</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">_step</span><span class="pl-kos">;</span> <span class="pl-c1">!</span><span class="pl-kos">(</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">_step</span> <span class="pl-c1">=</span> <span class="pl-s1">_iterator</span><span class="pl-kos">.</span><span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">_step</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
  <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-s1">err</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
  <span class="pl-k">try</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_didIteratorError</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-k">throw</span> <span class="pl-s1">_iteratorError</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<ul dir="auto">
<li>Babel v 4.7.8</li>
<li>Tested with Nodejs v0.10.36</li>
</ul>
<p dir="auto">It seems that</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let a = [1, 2, 3, 4, 5];
for (let i of a) {
  console.log(i);
}"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-c1">4</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-k">of</span> <span class="pl-s1">a</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">i</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">produces</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;;

var a = [1, 2, 3, 4, 5];
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;

try {
  for (var _iterator = a[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
    var i = _step.value;

    console.log(i);
  }
} catch (err) {
  _didIteratorError = true;
  _iteratorError = err;
} finally {
  try {
    if (!_iteratorNormalCompletion &amp;&amp; _iterator[&quot;return&quot;]) {
      _iterator[&quot;return&quot;]();
    }
  } finally {
    if (_didIteratorError) {
      throw _iteratorError;
    }
  }
}"><pre class="notranslate"><span class="pl-s">"use strict"</span><span class="pl-kos">;</span>

<span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-c1">4</span><span class="pl-kos">,</span> <span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span>

<span class="pl-k">try</span> <span class="pl-kos">{</span>
  <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">_iterator</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">_step</span><span class="pl-kos">;</span> <span class="pl-c1">!</span><span class="pl-kos">(</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">_step</span> <span class="pl-c1">=</span> <span class="pl-s1">_iterator</span><span class="pl-kos">.</span><span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-s1">_step</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">;</span>

    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">i</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">err</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">_didIteratorError</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
  <span class="pl-s1">_iteratorError</span> <span class="pl-c1">=</span> <span class="pl-s1">err</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
  <span class="pl-k">try</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">_iteratorNormalCompletion</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-s1">_iterator</span><span class="pl-kos">[</span><span class="pl-s">"return"</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span> <span class="pl-k">finally</span> <span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">_didIteratorError</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-k">throw</span> <span class="pl-s1">_iteratorError</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">It states in the documentation that for..of loops do not require the polyfill, however in this case it appears they either do, or are transpiling to ES6 code, given the <code class="notranslate">var _iterator = a[Symbol.iterator]()</code> in the produced for loop.</p>
<p dir="auto">Is the polyfill actually required for this? If so, the documentation should be updated. If not, then something is wrong.</p>