It worked. I don't know why. To me, I interpret it as if its not 1 or 2, where as now with the && I interpret it as if its not 1 and 2. How can it be 1 and 2? I can only input one entry.
It worked. I don't know why. To me, I interpret it as if its not 1 or 2, where as now with the && I interpret it as if its not 1 and 2. How can it be 1 and 2? I can only input one entry.
If it's not 1 AND it's not 2.. return false if BOTH conditions are satisfied.
|| (or) says return false if EITHER condition is satisfied.
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.