Tell us what’s happening:
hi! I am confused what this step is asking when it comes to concatenating an empty variable.
in my code I have result defined as empty:
let result = “”
So, how would I concatenate an empty variable?
Your code so far
const character = "#";
const count = 8;
const rows = [];
for (let i = 0; i < count; i = i + 1) {
rows.push(i);
}
let result = ""
// User Editable Region
for (const row of rows) {
let result = row + "rows";
}
// User Editable Region
console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 42