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 3359 times
Edit
10
Community EvaluationsNo one has reviewed this question yet, be the first!