Learn Introductory JavaScript by Building a Pyramid Generator - Step 13

Tell us what’s happening:

After completing the instructions, and previous lessons, getting the “You should log age to the console” error message when I Check Your Code but it appears correct to me. What am I missing?

Also, the three forum posts with the same issue are no help at all, I’d take them down.

Your code so far

let character = "Hello";

// User Editable Region

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

// 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/126.0.0.0 Safari/537.36 Edg/126.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 13

Hi there!
Recheck your console log. Also you need both the console statement after the assignment and declaration of the variables.

Thank you Hasan, that worked. Though I don’t understand why console logs both had to be at the end. The other examples before it did not. What’s the reason and is it always this way or just specific to this exercise?

1 Like

That’s because the challenge instructions. Somewhere else you add the console statement after variable assignment.

1 Like