Javascript function call by string name
<p>I have a javascript function defined like this </p>

<pre><code>function is_mandatory(string){
     if(string.length &gt; 0 )
 return true;   
}
</code></pre>

<p>Now, i am trying to call the function defined as a sting name </p>

<pre><code>var is_mandatory; 

is_mandatory("Check"); 
</code></pre>

<p>But, this returns an error saying variable is not a function. How can I call the function from a string name. </p>

<p>Cheers!</p>
