title: Determine if one array contains all elements of another array, including any duplicates
body: <p>I'm looking for a function that returns true if and only if a given array includes all the elements of another target array which may include two or more occurrences of the same element.</p>
  <p>Sample data:</p>
  <pre><code>const target = [ 1, 3, 3 ];
  const array1 = [ 1, 2, 3, 4 ]; // false
  const array2 = [ 1, 3, 3, 4 ]; // true
  const array3 = [ 1, 3, 4, 3 ]; // true
  const array4 = [ 3, 2, 1, 3 ]; // true
  const array5 = [ 1, 1, 3, 3 ]; // true
  </code></pre>
  <p>This <a href="https://stackoverflow.com/questions/53606337/check-if-array-contains-all-elements-of-another-array">question's answer</a> is close but doesn't account for duplicates in target array.</p>
  <p>This <a href="https://stackoverflow.com/questions/13553822/determine-if-one-array-contains-all-elements-of-another-array">question's answer</a> works for Ruby but I'm looking for a Javascript solution.</p>
  <p>When not accounting for duplicates, .indexOf() and .includes() make it rather easy and there are elegant one-liner solutions. But I'm unsure how to keep track of duplicates and suspect a more iterative approach is needed.</p>