const birthYear = 2002;
let century;
if (birthYear <= 2000)
let century = 20;
} else {
let century = 21;
}
console.log(century);
So the problem is when i run the code console says "undefined". I wanna know what is the problem. (I'm new at coding and all this stuff, so, please help. Thanks in advance)