title: NodeJS default parameter when last parameter is the callback
body: <p>I have a function like this one (simplified) :</p>
  
  <pre><code>doSmthg (name, age, callback) {
    callback(name, age);
  }
  </code></pre>
  
  <p>I'd like to have a default value for age if it's not provided.</p>
  
  <p>I know I could do <code>doSmthg(name, callback, age=42) {...}</code> in ES6 but I've been told callback should always be the last parameter as it make the call to the function more readable.</p>
  
  <p>For now the solution I found is to do the following :</p>
  
  <pre><code>doSmthg (name, age, callback) {
    if (arguments.length === 2) {
      age = 42;
      callback = age;
    }
  }
  </code></pre>
  
  <p>But I find this solution hard to read.</p>
  
  <p>Is this the good solution ? Is there a better one ?</p>