AND OR NOT the logical operatorsLogical operators are mostly consist of AND OR NOT and its combinations. We will discuss more on this with examples for better understanding.
We will use if condition to check and then document.write to print the result. Here is the code.
AND is also written as &&
OR is written as ||
NOT is written as !
NOT EQAL TO !=
Here is a table with different examples of logical operators
|my_var=="5" && my_var2=="plus2net"||True|
|my_var==="5" && my_var2=="plus2net"||False|
|my_var==5 || my_var2=="plus2net"||True|
|my_var==4 || my_var2=="plus2net"||True|