I'm trying to make a program that only accepts a few values. So, if "e" variable is not 1 or 2 or 3, says that the number is not correct, but if the value is equal to those numbers, then the else part is run.
All of this may sound very begginer level and easy to implement, and it is, but I ran the code and EVERY vaule I set to "e" runs the if part.
Here is code:
var e;
e=parseFloat(prompt("Input e",""));
if(e!=1 || e!=2 || e!=3)
{
alert("put again E");
}
else
{
//whatever
}
eis(e!=1 || e!=2 || e!=3)false? Think about it.