I've searched and I can't find a question already like this. However, why does this code work?
this.askTeller = function(pass) {
if (pass == 1234) return bankBalance;
else return "Wrong password.";
};
Shouldn't it be like
this.askTeller = function(pass) {
if (pass == 1234) {
return bankBalance;
}
else {
return "Wrong password.";
};
Aucun commentaire:
Enregistrer un commentaire