F
Fernie
How do you specify an and/or condition in javascript? I can specify a
condition as follows:
if (var = 'text1')
{
alert('the variable is equal to text1');
}
What I'd like to do is add an 'or' condtion but I get a syntax error:
if (var = 'text1' or var = 'text2')
{
alert('the variable is equal to either text1 or text2');
}
Thanks in Advance,
Fernie
condition as follows:
if (var = 'text1')
{
alert('the variable is equal to text1');
}
What I'd like to do is add an 'or' condtion but I get a syntax error:
if (var = 'text1' or var = 'text2')
{
alert('the variable is equal to either text1 or text2');
}
Thanks in Advance,
Fernie