Javascript if condition with return
<p>Folks, I am modifying a current function slightly to make use of two
variables. I have shown the past and present versions in the code snippet. <br/>
Basically what I want is if either one of the  two <code>if conditions</code> namely <strong>First Condition</strong> and <strong>Second Condition</strong> are 
are true, do not execute the remaining logic of the function. If both are false, continue with the remaining code of the function. <br/>
 I think I am making a 
silly mistake somewhere and if the first condition is true, execution is stopping right there. 
(I Know that is because of the return statement at the end.)
How do I make sure the second if condition as well even if first one was true and returned a <code>return</code></p>

<pre><code>function myAlgorithm(code1, code2) {

   if(eval(code1)) {

      if(First condition) {
         alert("You cant continue");

         return;
      }
    }

    if(eval(code2)) {
       if(Second condition){
         alert("You cant continue");
       return;
      }

    }

    //If both of the above if conditions say "You cant continue", then only
    //disrupt the function execution, other wise continue with the left
    //logic

    //Rest of the function logic goes here

}
</code></pre>

<p><strong>Ealier this code used to be:</strong></p>

<pre><code>function myAlgorithm() {

   if((First Condition) &amp;&amp; (Second Condition)){
    alert("You cant continue");

    return;
   }

  //Rest of the function logic goes here
}
</code></pre>
