Learn Introductory JavaScript by Building a Pyramid Generator - Step 13

Tell us what’s happening:

let profession;
console.log(profession)
let age;
console.log(age)
let profession=“teacher”;
Hello. Something is wrong with my code. Will you help me, please?

Your code so far

let character = "Hello";

// User Editable Region

let profession;
 console.log(profession)
let age;
console.log(age)
let profession="teacher";

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 13

you can’t have let profession twice, you need to remove one of the two.
maybe delete the first one, as that one is not initialized with a value, you will need to move the console.log

1 Like

Thanks, it is a real solution of the problem.