Use the ampersands in if statement - Javascript Statement

Javascript examples for Statement:if

Description

Use the ampersands in if statement

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.4.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from  ww w .java 2 s  .c om
if(true && true)
{
 console.log('inside other if');
}
if(true && false)
{
 console.log('should not get here');
}
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials