If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Help Me

Hi I need to create a program for a friend that will prompt users for the state in which they live in. Upon entering their state, the corresponding region will be kicked out to them through an alert. Can anyone please help me out and discover why an error message keeps on occuring in line 51??? It would be greatly appreciated.

You have a number of syntax and logic testing errors.
1. 'break' is not an appropriate ending for an 'if' statement
2. Your string comparisons cannot use a '=' assignment statement

I added some logic to test if the user cannot spell a state correctly.
I compressed your code somewhat and it can be shorten further by removing he commented sections
that I left in to show the areas changed.

Note, you should add some logic to assure the state is capitalized as 'Utah' would be found, but 'utah' would not!