It is telling me to “assign” the string test to my secondCharacter variable. I don’t understand where to put my “test” string. I am on step 10 of Introductory Javascript by building a Pyramid Generator. Please do help me
My code is:
let secondCharacter;
console.log(secondCharacter);
let secondCharacter;
secondCharacter = " ";
Your code so far
// User Editable Region
let character = 'Hello';
console.log(character);
character = "World";
let secondCharacter;
console.log(secondCharacter);
let secondCharacter;
secondCharacter = "";
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 10
The first is declared and initialized while the second is only declared. To declare is to form a variable while to initialize is to give the variable a value.
Yea, thats what i thought, yet it still says “I should add the ‘string’ test to the variable.”
It’s teaching me to add a value to a "unitialized variable. i will try to follow your advice, thanks