Learn Introductory JavaScript by Building a Pyramid Generator - Step 2

Tell us what’s happening:

getting error after using let keyword and also i have use the variable character

Your code so far


// User Editable Region

let k("character");
console.log(k)


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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 2

Hi there and welcome to our community!

I’m not sure exactly what you’re trying to do here, or why there’s a ‘k’ involved?
All you should do in this step is initialise the variable character, without assigning a value.

EXAMPLE:

// initialise a variable without a value
let myVariable;

// initialise a variable with a value
let myOtherVariable = "hello";

// assign a value to an existing variable
myVariable = " world";

console.log(myOtherVariable + myVariable); // "hello world"