Question from the Javascript - Fundamentals test

The certificate variable is not attainable outside the if loop

Easy

What's the problem with this code?

const student  = "INSA"; 
if (student === "INSA") 
{ 
        let certificate = true; 
        console.log('In this block, student='+student+'; certificate='+certificate); 
} 
console.log('In this block: student ='+student+'certificate='+certificate); 
Author: KahinaStatus: Published(Update)Question passed 2418 times
Edit
8
Community Evaluations
developer avatar
Gauthier
16/12/2023
J'ai eu faux sur la rĂ©ponse 3 "la variable “etudiant” est constante" alors qu'elle est bien dĂ©finie en tant que constante
developer avatar
Auteur anonyme
26/12/2023
La variable étudiant est bien définie en tant que constante mais ça ne pose pas de problÚme à l'exécution.