Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

BBS: Multiple if then else - August 10, 1998 at 06:37:37

You are here: irt.org | BBS | Multiple if then else [This BBS is closed]

Posted by Andy Tatton on August 10, 1998 at 06:37:37:

When I do multiple if then else statements in javascript, I have a problem.

example:
if (a==1) {
alert ('Option 1);
}
if (a==2) {
alert ('Option 2');
}
else {
alert ('Choose an option');
}

if I make a equal 1 then I get Choose an option output.

what am I doing wrong?

Andy
Follow-ups:

You are here: irt.org | BBS | Multiple if then else [This BBS is closed]

©2018 Martin Webb