JavaScript: How to merge two functions into one new function?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7091650/merge-two-functions">Merge two functions?</a>  </p>
</blockquote>



<p>Say, I have these two functions:</p>

<pre><code>function foo() {
  this.lorem = 'ipsum';
}

function boo() {
  console.log(this.lorem);
}
</code></pre>

<p>And I want to merge them into one, say, <code>fb</code> function.</p>

<p>So, triggering the <code>fb</code> function will display the <code>lorem</code> word in the console.</p>

<p>It needs to be done without modifying the two functions.</p>
