I dont understnad what i am doing wrong . i think i only needed to add +“\n”
Error: " You should assign the entire concatenation back to your result variable. Don’t forget your semicolon."
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) {
result = result + "\n" + row ;
}
// User Editable Region
console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 43
if i use this
result = result + “\n” + row;
it works
but if i use this //if there is a space before semicolon it doesnt work
result = result + “\n” + row ;
it doesnt work
i think its bug
i’m not sure what is happening there but please report it here:
Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.
please let me know if you will go ahead an open an issue or not. We need to track this as other testcases do not care about the semi-colon and so for the consistency of the UI we should get this testcase fixed to match. (I will open the issue if you don’t want to do it)