Skip Navigation
41 comments
  • An if statement with one condition is an if and only if statement. The moment you add a second (or more) condition (regardless of && or ||), then it’s no longer if and only if.

  •  undefined
        
        if ( test == false )   
            x = 1
        else
            x != 1
    
      
    • Not sure what you’re trying to achieve with that else block, as it affects nothing.

      • okay I fixed it

         undefined
            
            if ( test == false )
                x = 1
            else
                assert( x != 1 )
        
          
41 comments