I have the following code in one of my react files. Clearly the value of showMentor2 is false, however in the console (shown below), "this still gets called" still gets printed. Can someone help me figure out what's going on?
const showMentor2 = userInfo.isMentor;
console.log(`This is the value of showMentor2 ${showMentor2}`);
if (showMentor2) {
console.log('this still gets called');
}

Aucun commentaire:
Enregistrer un commentaire