title: Can I pass a parameter to ES6 generator function
body: <p>Here's a ES6 generator:</p>
  
  <pre><code>function *Gen() {
      var input1 = yield 'output1'
  }
  
  var gen = Gen()
  
  gen.next('input1').value // return 'output1'
  </code></pre>
  
  <p>gen called 1st time, return <code>output1</code> but the variable <code>input1</code> doesn't equal <code>'input1'</code> which passed in , the value of <code>input</code> actually is the 'input2', 2nd time <code>next('input2')</code>called</p>
  
  <p>My question is how to access the <code>input1</code> which is the first time next called, something like:</p>
  
  <pre><code>function *Gen() {
      var input 1 = param1
      var input2 = yield 'output1'
  }
  </code></pre>