Learn Introductory JavaScript by Building a Pyramid Generator - Step 10

Tell us what’s happening:

Assign the string “Test” to your secondCharacter variable below your declaration. Open the console to see how your log has changed. i need help

Your code so far


// User Editable Region

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

console.log(secondCharacter);


// 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 10

what kind of help do you need?

hi there, you haven’t shown us what you tried so far.

Please make an attempt and show it to us so we have an idea what it is you know or don’t know.
For eg. do you know where the new code should be added?
Do you know how to create the required string?

Please show us what you have done.

ok sorry so iv tried to write this // secondCharacter = “test”;
let secondCharacter

Tell us what’s happening:

iv trid to write this about 3 times but none seem to work out for mr.

Your code so far


// User Editable Region

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

console.log(secondCharacter);
let secondCharacter;
secondCharacter = "test";


// 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 10

you need to add the new code after the above declaration.

2 Likes

please don’t create duplicate topics for the same question or step.
I’ve merged the duplicates.

1 Like

i suggest you click reset and try this one again because it looks like you have duplicate code right now.

you have already declared the variable secondCharater. remove the second declaration and move the secondCharacter = "test"; to above the console.log statment.

i also did that but di not work at all

post your updated code here, using three back ticks in a seperate line below and above your code block.

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