Determing the type of the return value
<p>I get a return value from a function which is always string. i used <code>typeof(obj)</code> which turns out to be <code>string</code> always.</p>

<pre><code>Date.functionName=Date.prototype.functionName=function(dataObj) {
        //The dataObj is always string. 
            // How can i differentiate between the values... 
};
</code></pre>

<p>I have three things coming as strings..</p>

<ol>
<li>Date</li>
<li>String... </li>
<li>Integer values... </li>
</ol>

<p>All the three are of type <code>string</code>.</p>

<ol>
<li>How can i differentiate these three values.</li>
<li>Is it correct to use Date.mycustomfunction... or should i use some
other class...</li>
</ol>
