// Given a total, return all the possible items someone can order and have no change left over.

// Input:  An integer N (total being spent)
// Output: An array (number of ways to spend exact total)

@@ -192,8 +192,705 @@
  total)%0A
+%0A%0Avar items = %5B%22Fruit%22, %22Fries%22, %22Salad%22, %22Wings%22, %22Stick%22, %22Plate%22%5D;%0Avar prices =%5B 2.15,    2.75,    3.35,    3.55,    4.20,    5.80  %5D;%0Avar results = %5B%5D;%0A%0Afunction appetize(money_left, cart=%5B%5D)%7B%0A  if( money_left %3C 0 )%7B%0A    return;%0A  %7D%0A  if( money_left === 0 ) %7B%0A    results.push(cart);%0A    return;%0A  %7D%0A  var i =0;%0A  while( i%3C items.length )%7B%0A    cart.push(items%5Bi%5D)%0A    // if( prices%5Bi%5D === money_left )%0A    appetize( money_left - prices%5Bi%5D, cart )%0A    cart.pop()%0A    i++;%0A  %7D%0A%7D%0A%0A//appetize(-1)   // returns: nothing%0A//appetize(0)    // prints: %5B%5D%0A//appetize(2.15) // prints: %22Fruit%22%0A//appetize(3.35) // prints: %22Salad%22%0A//appetize(4.30)%0Aappetize(15.05)%0A%0Aconsole.log(results%5B0%5D)%0A%0A// return names%0A

add first iteration