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!
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>Regions3</TITLE>
<SCRIPT type="text/javascript">
function regionSelect() {
var state = prompt("You live in what state?");
var region1 = "New England Region";
var region2 = "Middle Atlantic Region";
var region3 = "Southern Region";
var region4 = "Midwestern Region";
var region5 = "Southwestern Region";
var region6 = "Western Region";
var region = 'Unknown part of the country';
if ("Connecticut,Maine,Massachusetts,New Hampshire,Rhode Island,Vermont".indexOf(state) != -1) {
region = region1; // alert("You live in the " + region1); // break;
}
if ("Delaware,Maryland,New Jersey,New York,Pennsylvania".indexOf(state) != -1) {
region = region2; // alert("You live in the " + region2); // break;
}
if ("Alabama,Arkansas,Florida,Georgia,Kentucky,Louisiana,Mississippi,Missouri,North Carolina,South Carolina,Tennessee,Virginia,West Virginia".indexOf(state) != -1) {
region = region3; // alert("You live in the " + region3); // break;
}
if ("Illinois,Indiana,Iowa,Kansas,Michigan,Minnesota,Nebraska,North Dakota,Ohio,South Dakota,Wisconsin".indexOf(state) != -1) {
region = region4; // alert("You live in the " + region4); // break;
}
if ("Arizona,New Mexico,Oklahoma,Texas".indexOf(state) != -1) {
region = region5; // alert("You live in the " + region5); // break;
}
if ("Alaska,California,Colorado,Hawaii,Idaho,Montana,Nevada,Oregon,Utah,Washington,Wyoming".indexOf(state) != -1) {
region = region6; // alert("You live in the " + region6); // break;
}
alert("You live in the " + region); // break;
}
</SCRIPT>
</HEAD>
<BODY>
<H1>Find state's region!</H1>
<button onclick="regionSelect()"> Enter State </button>
</BODY>
</HTML>