they keep saying that I should log the value of i inside of for loop even though I’ve done that and the output is 8 am I missing a space or something?
Your code so far
const character = "#";
const count = 8;
const rows = [];
// User Editable Region
for (let i = 0; i < count; i = i + 1,console.log(i)) {
};
// 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/109.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 37
thank you (: it’s worked for me . but now the result is differant instead of : 1
2
3
4
5
6
7
8
it’s: 0
1
2
3
4
5
6
7
since i put it outside of the condition.
That is expected. The console log statement is logging the value of i, correct?
Since your for loop starts declares the i with value zero, the log will show zero first.