Learn Introductory JavaScript by Building a Pyramid Generator - Step 59

Tell us what’s happening:

Following step 59, the steps say to log the string below the return statement. obviously this is supposed to fail, then it says to copy and paste above the return statement. There are no more instructions to pass the code portion. the error I’m given is the first log should come after return. how do i tell the code that i logged the first below return and copied it above? I am assuming that’s whats needed to pass. Thanks!

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;
  console.log("This Works");
}


// 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 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 59

I have also seen this in other posts to identify first and second, but this also fails:

function padRow(name) {
const test = “Testing”;
//second
console.log(“This Works”);
return test;
//first
console.log(“This Works”);
}

Make sure you log the exact string that is asked for.

console.log("This works!")

I’m an idiot, punctuation kills me every time. Got it, thanks!

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