Getting started with conditionals

  • + 1 comment

    That's because (( .. )) deals with only arithmetic operations, hence, is expected to give wrong results here.

    If the value of expression inside double-parentheses evaluates to zero, only then it is considered as false (otherwise true).


    Though, both the statements would have worked correctly if we were dealing with integers instead of alphabets (i.e. n,N,y,Y).