title: Check if argument is passed to a Java Script function
body: <p>Call to a JS function </p>
  
  <pre><code>alertStatement()
  </code></pre>
  
  <p>Function Definition     </p>
  
  <pre><code>function alertStatement(link) {
      if (link) {
          alert('A');     
      }
  
      if (link!=null) {
          alert('B');     
      }   
  }
  </code></pre>
  
  <p>Both of these statements are working fine in Windows Env with Tomcat, but none of them execute it on production (Linux server). Is there any other way to compare variables to make it working? </p>
  
  <p>I got it working using the following javascript code.</p>
  
  <pre><code>function alertStatement(link) {
      if (link!==undefined){
          alert('A');     
      }
  }
  </code></pre>
  
  <p>So at last undefined worked for me , for some reason null comparison didn't work</p>