I am beginner in Javascript I am always getting true returned whatever the values of my variables, It should return true if a and b are both even, but false otherwise. Thanks for your help.
var a = 4;
var b= 5;
function areBothEqual (a, b) {
if(a===b) {
return true;
}else {
return false
}
}
var result = areBothEqual();
document.write(result)
Aucun commentaire:
Enregistrer un commentaire