I'm working on some basic Javascript with an array and if/else statement and for some reason this code doesn't return the false message. It keeps returning the first true message.
let names = ['tommy', 'mike', 'bubba', 'mario', 'rafael']
if (names[4] = 'bubba') {
message = "You are a good guy";
} else {
message = "Who are you??";
};
Aucun commentaire:
Enregistrer un commentaire