title: Javascript Tree Traversal Algorithm
body: <p>I need help traversing a tree structure in  a depth first fashion. I can't come up with an algorithm to do it properly.</p>
  
  <p>My input is this:</p>
  
  <pre><code>[
      ["A", "B", "C"],
      ["1", "2"],
      ["a", "b", "c", "d"]
  ]
  </code></pre>
  
  <p>The output should take the form:</p>
  
  <pre><code>[
      "A/1/a", "A/1/b", "A/1/c", "A/1/d",
      "A/2/a", "A/2/b", "A/2/c", "A/2/d",
      "B/1/a", "B/1/b", "B/1/c", "B/1/d",
      "B/2/a", "B/2/b", "B/2/c", "B/2/d",
      "C/1/a", "C/1/b", "C/1/c", "C/1/d",
      "C/2/a", "C/2/b", "C/2/c", "C/2/d"
  ]
  </code></pre>