title: Combinations Of Numbers To Equal One Total
body: <p>In javascript I get two numbers let's call them x &amp; y and an array of integers with random int's from 0 - 10 arrayints.</p>
  
  <p>x is the number I'm trying to get by combining y with any of the numbers in arrayints.</p>
  
  <blockquote>
    <p>for example: lets say x = 8 and y = 3 and arrayints consists of numbers arrayints(1,7,2,7,4,5)</p>
  </blockquote>
  
  <p>so x could equal = y + 5
  or
  x = y + 1 + 4</p>
  
  <p>All the values in x, y and arrayints will be random and always &lt;= 10.</p>
  
  <p>Please advise if more information is needed and everything will be in javascript or jquery no fuss as far as my code goes I will copy and paste but it will just be one blob of incromprehensible letters which are giving me an headache.</p>
  
  <pre><code>function makex(x,y) {
  //this is how I get the array of random ints &lt;=10
    $("#div").children().each(function(n, i) {
      var id = parseInt(this.id+"");      
    });                           
   }
  </code></pre>