Learn Introductory JavaScript by Building a Pyramid Generator - Step 6

Tell us what’s happening:

My code is: let console.log = character
“character”= “World”.
But it isn’t correct. I want to find out how to fulfil step six. The task ist: Step 6

Now log your character variable to the console again. You should see the string "Hello", then the string "World", in the console. My problems are: Sorry, your code does not pass. Try again.

You should use console.log a second time. // running tests You should use

console.log

a second time. You should log

character

to the console a second time. // tests completed

Your code so far


// User Editable Region

let console.log = character
"character"= "World"

// 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/124.0.0.0 Safari/537.36 OPR/110.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 6

This is very wrong. Honestly if you don’t have a good grasp of declaring variables and logging to console, you should ask questions about that or go back to the first lesson and do it over.

Read the descriptions and examples until you understand. If it doesn’t explain it well search for another explanation or ask a specific question on the forum. “What is console.log” for example or “what is a variable”. Someone will help you with that!

Reset the step and read the instructions and please try again. Don’t change any of the existing lines. Although, I hope you can see what you’ve changed is very wrong.

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

This is from the original code, where character is logged to the console using the function console.log(). Here is the instruction:

Now log your character variable to the console again.

Add a new line at the bottom, don’t change existing lines.

1 Like

Why are you doing Step 6 and step 3 at the same time? Don’t…

Thank you. I’ll do it. Yes, I will do as you said. The history of the quection is the next: The background to the question is that I took the second step for three days in a row. Today a miracle happened, I coped with it. And not only with him, but in one breath I completed other steps, reaching the sixth, without having time to understand what I was doing, I did it. But when I reached the sixth, I realized that I had not yet developed the skills and abilities from the previous steps. I will fix the problem.

I’ve just explained the background of the problem…

It’s more important, at this stage especially, to completely and thoroughly understand each new concept. Take your time.

Ask more specific questions if you need to. “What is the difference between a variable and a string?”

“What is a function?”

etc.

1 Like

Thank you for your advice and recomendations, I’l try it as you say.

2 Likes

If you’re still having problems on step 6 ask your questions or post your code here.

You’ve mixed up the declaration of variable and its value.
Just define the variable and its value then log on the console
let variable = string
console.log (variable)

Step 6

Now log your character variable to the console again. You should see the string "Hello", then the string "World", in the console. My code is: let developer = “character”;
console.log(character);
The prompt is: Sorry, your code does not pass. Keep trying.

You should use console.log a second time.

I’ ve made as you show: let character = “Hello”
console.log (“World”),
but the system asks me: Sorry, your code does not pass. You’re getting there.

You should use console.log a second time.

I suggest you reset step 6, and begin with the code that was already there.

It is asking you to do something “again” so you have already done it. You need to be able to see “Hello” and “World” on the screen to the right.

Thank you. I’ll try as you recommend in order to see the result.

I only see console.log once. You need to add another one

log your character variable to the console again.

Log the character variable. You are logging the string “World”:

Reset the step, read the instructions carefully and try again. Don’t change any existing lines, just add a new line

1 Like

A miracle has happened. I completed step six. Somehow, thanks to your help, I managed to find the right code combination. Thank you so much for your help and support.

Do you understand the solution and do you have any questions about it?

Don’t accept a miracle that you by chance stumbled upon the right thing. Learn what it is that needs to be done. If you don’t learn and understand it you won’t be able to complete the further steps!

If you learn and understand now, the future will be easier.

Yes, I understand the solution and realise the way which brought me to it. Now I’m trying to learn by heart all the methods which helped me to find it in order to be able to fulfil the next steps. As soon as I’m ready, I’ll begin doing the further steps.

1 Like

Then it’s no miracle at all, just the result of your hard work :muscle:

1 Like

I agree with you. Thank you.

1 Like

But I understood that Learn Introductory JavaScript by Building a Pyramid Generator is too early for me, so I began learning HTML by creating an App for cats as the beginner. Am a right in this solution?