Learn Introductory JavaScript by Building a Pyramid Generator - Step 7

Tell us what’s happening:

Step 6
When a variable is declared with the let keyword, you can reassign (or change the value of) that variable later on. In this example, the value of programmer is changed from “Naomi” to “CamperChan”.

Example Code
let programmer = “Naomi”;
programmer = “CamperChan”;
Note that when reassigning a variable, you do not use the let keyword again.

After your console.log, assign the value “World” to your character variable.

Your code so far


// User Editable Region

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


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/28.0 Chrome/130.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 7

Hi @Miguearr and welcome to our community!

You should have two console.log statements, one after each of the variable assignments.