title: Getting req.params in order in Express JS
body: <p>In Express, is there a way to get the arguments passed from the matching route <strong>in the order they are defined in the route</strong>?</p>
  
  <p>I want to be able to apply all the params from the route to another function.  The catch is that those parameters are not known up front, so I cannot refer to each parameter by name explicitly.</p>
  
  <pre><code>app.get(':first/:second/:third', function (req) {
      output.apply(this, req.mysteryOrderedArrayOfParams); // Does this exist?
  });
  
  function output() {
      for(var i = 0; i &lt; arguments.length; i++) {
          console.log(arguments[i]);
      }
  }
  </code></pre>
  
  <hr>
  
  <p>Call on <code>GET: "/foo/bar/baz"</code></p>
  
  <p>Desired Output (in this order):</p>
  
  <pre><code>foo
  bar
  baz
  </code></pre>