title: es6 how to use default parameters that go before non-default parameters?
body: <p>I am a bit rusty on default parameters, and I am wondering how can I use a default value for a parameter if it goes before parameters without defaults?</p>
  
  <p>In the <a href="http://redux.js.org/docs/basics/ExampleTodoList.html" rel="noreferrer">example from Redux.js</a> below, when will the default value <code>{}</code> for the <code>state</code> parameter be useful? (since you can't default the next parameter)?</p>
  
  <pre><code>const todo = (state = {}, action) =&gt; {
    switch (action.type) {
      //...
  
      case 'TOGGLE_TODO':
        if (state.id !== action.id) {
          return state
        }
  
        return Object.assign({}, state, {
          completed: !state.completed
        })
  
      default:
        return state
    }
  }
  </code></pre>