Learn Introductory JavaScript by Building a Pyramid Generator - Step 60

Tell us what’s happening:

I copied and pasted console.log = “This works!” above return test, as instructed, and I am still getting an error.

Your code so far

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


// User Editable Region

function padRow(name) {
  const test = "Testing";
console.log = "This works!"
  return test;
  
}


// 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 + "\n" + row;
}

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.6 Safari/605.1.15

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 60

It looks like instead of copying the line you cut the line.
You should have two copies of the line.

silly me! thanks!!!

1 Like