I'm new to coding so apologies for the really basic question.
I have made a javascript function called ErrorType that checks whether my variables 'correct' and 'response' equal 70 and 68 respectively. If they do, then I want to set 'correct_rule_wrong_resp' to 1.
My problem is that when I call the function, it has no effect on the value of 'correct_rule_wrong_resp'. Where am I going wrong?
correct = 70;
response = 68;
correct_rule_wrong_resp = null;
function ErrorType (a, b, c){
if (correct == a && response == b){
c = 1
}
}
ErrorType (70, 68, correct_rule_wrong_resp)