June 28th, 2013, 07:08 PM
Word Specific Criteria
Hi everyone, I am new to the dev shed forums here. My question is just regarding word specific criteria. I want a certain word to trigger the end result of the program but I am struggling. I am putting the code to a simple program demonstrating the problem below. Any help would be appreciated, Thank You.
myMajor = prompt("Enter your major",0);
if (myMajor = "CI")
msg = "Not enough points for a prize";
if (myMajor <= 50)
msg = "You can choose a prize from group B";
msg = "You can choose a prize from group A";
June 28th, 2013, 07:45 PM
Single = sign is an assignment operator, double = sign is a comparison operator.