title: How to merge two arrays in JavaScript and de-duplicate items
body: <p>I have two JavaScript arrays:</p>
  
  <pre><code>var array1 = ["Vijendra","Singh"];
  var array2 = ["Singh", "Shakya"];
  </code></pre>
  
  <p>I want the output to be:</p>
  
  <pre><code>var array3 = ["Vijendra","Singh","Shakya"];
  </code></pre>
  
  <p>The output array should have repeated words removed.</p>
  
  <p>How do I merge two arrays in JavaScript so that I get only the unique items from each array in the same order they were inserted into the original arrays?</p>