Learn Introductory JavaScript by Building a Pyramid Generator - Step 5

Tell us what’s happening:

not sure whats happening the hint says you should print the character variable to the console

Your code so far


// User Editable Region

let developer = "character";
console.log(developer);


// 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/129.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 5

Hi @ryanstruckus

It looks like you swapped the variable name with the variable from the example.

Please reset the step to restore the original code and try again.

Happy coding

the instructions were to Print the value of the character variable to the console. Then, click the “Console” button to view the JavaScript console.

Hi @ryanstruckus

The code above accesses the developer variable with its name in the console.log(). Note that the value between the parentheses is the value that will be printed.

Print the value of the character variable to the console. Then, click the “Console” button to view the JavaScript console.

The developer variable is from the example.

You changed the variable name form character to developer, and the string from Hello to character

Here is the original code:

let character = 'Hello';

For this step, add a second line of code to display the variable in the console, without modifying the first line.

Happy coding

so it would be

let character = 'Hello';
console.log(character);
let character= 'World'
character ='World'

The first two lines are correct.

You can declare variables with the let keyword only once.

ok but if i erase those to lines that just leaves me with what i started with at the begging of the leason

You started with line 1
You added line 2 for this step, that’s it. The console will display the text Hello

ya i just figured that out when i reread your post thanks you were a big help

1 Like