Javascript: Check if string can be re-created by combining other strings in an array?
<p>I'm trying to figure out the best way to check whether a particular string can be created by combining other strings that I have in an array. The other strings can be any length, including one character. Furthermore, the characters in the other strings can be reordered.</p>

<p>So if we were looking for the word "dodge" and our array of strings was <code>['god','house','d','e','cat','c','r','jump']</code>, we would have a match, since we could combine the letters in 'god','d', and 'e' to create 'dodge'.</p>

<p>If the array contained "dot" instead of "d", we would not have a match, since we have to use all the characters in each of the words we recombine (we'd have to use 'o' and 't' as well).</p>

<p>I would also like to know which words were used to create the specified word, so if there is a match I want the function to return the array indexes of the words that were recombined to create the specified word. For the "dodge" example above it would return [0,2,3].</p>
