Learn Introductory JavaScript by Building a Pyramid Generator - Step 13

Tell us what’s happening:

Trying to figure out why it’s not assigning string “teacher” to my profession variable.

Your code so far

let character = "Hello";

// User Editable Region

let profession = "teacher";
console.log(profession);
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

Instructions for the challenge step:
Use the let keyword to declare a profession variable and an age variable. Initialize profession with the string “teacher”, but do not initialize age with any value.

Log both of your variables to the console to see the results.

You need to add age variable with let keyword before the console.log without initialize it.
Also you need to log the age variable.

1 Like

The error it gives me says You should assign the string "teacher" to the profession variable.
Im not sure what ive gotten wrong with that line. I have tried it as i originally posted and again as
let profession =;
let age =;
profession = “teacher”;
console.log(profession,age);

and it is still showing as incorrect. I am just not sure what is incorrect about that. I followed like the prior steps to get to this one but I must be missing something

let profession =; is throwing error.
let age =; the equal operator is throwing error with age, because you don’t need to initialize it.

Missing let keyword before variable profession.

Use separate console log for age variable.

1 Like

this is solution:
code removed by mod

hey @hend.ahmedselim21

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Ok ,thanks for notice me .i remind that in the next times

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.