I have a line of code that is supposed to act as a check for if the user inputs a value that isn't within my array.
I made an array with all valid inputs and then made and if statement that checks this.
var productCode = ["LT","ST","DC","LC","PR","SP"];
var productChosen = prompt("Choose a product code, LT, ST, DC, LC, PR, or SP");
if ( productChosen === productCode) {
etc..
}
else {
alert("Please input a valid product code");
}
It always goes to the else statement.