Learn Introductory JavaScript by Building a Pyramid Generator - Step 57

Tell us what’s happening:

Aku kurang mengerti dalam hal ini, bisakah di bantu ? dan bisakah ketikkan kode yang benar untuk step ini ?

Your code so far

const character = "#";
const count = 8;
const rows = [];

// User Editable Region

const character = "Professor";
function padRow(name) {
  return character + name;
}
padRow("Naomi")

// User Editable Region

const call = padRow("CamperChan");
console.log(call);


for (let i = 0; i < count; i = i + 1) {
  rows.push(character.repeat(i + 1))
}

let result = ""

for (const row of rows) {
  result = result + row + "\n";
}

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 57

could you please use English, so someone can understand your code issue.

Indeed, from there, the code is in English

I don’t understand this, can you help? and can you type the correct code for this step?

Hi @rhizna39

Please remove this line from the editor.

That was code given as an example.

Happy coding

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.