title: Append string in before the last word Javascript
body: <p>My input1 is "perfectly clean" "multi action" cleansing<br>
  My input2 is "perfectly clean" "multi action"</p>
  
  <p>I need to append "and" in the last but one position 
  eg: if input1 then output should be "perfectly clean" "multi action" and cleansing 
  if input2 "perfectly clean" and "multi action"</p>
  
  <p>The input is dynamic but I need the output with the double codes as in the input 
  can u help me with a solution which satisfies both the input</p>
  
  <p>i tried like this </p>
  
  <pre><code>var text = g_eCatalogMeta.searchCorrected,
      clength = text.split('"');
  
  clength = clength.filter(function(n){ return n != "" &amp;&amp; n!=" "});
  
  if (clength.length &gt;1) {
     var aa =clength.length;
     clength.insert(aa-1, "und");
     text = clength.join;
  }
  </code></pre>
  
  <p>But could not get the double codes and the last word.
  Please help me out.</p>