Basically I have three values.
Each of those values is specified in a variable.
In the if
statement I would like to state all these 3 values to be true
in order for it to perform the if
statement.
For example: val == 'Millennium Wheel'
and val2 = 'Palace of Westminster'
and then comes val3
, all of these should be stated to be true before the if statement is applied.
Code is given below, thanks for your help.
function checkanagram() {
var val = $("#anagramtext").val();
var val2 = $("#anagramtext2").val();
var val3 = $("#anagramtext3").val();
if (val == 'Millennium Wheel') {
alert('Correct Answer!');
} else {
alert('Incorrect answer, try again');
}
}