This section is not passing: Lesson 60 of Building a Pyramid Generator

I’ve tried using the console.log before the return statement, after the above statement and before + after the return statement. But still this section is not passing. Pls is this a bug, I need help

Hi. Can you link to the step you are stuck on please. You should be able to do this in the template.

Thanks @a1legalfreelance, attached to this reply is a picture and I’ve also added a link to the lesson

It would also help if you post your full current code.

the template @a1legalfreelance is talking about you get if you use the HELP button to create a post

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

2 Likes

It is best to post the actual code and a link to the Step instead of a picture.

Though, you didn’t perfectly follow the instructions down to the last letter.

1 Like

that is not step 16. Please create a post using the help button as I wrote above, from the test you need help one

Apology, its step 60

Tell us what’s happening:

This section is not passing: Lesson 60 of JavaScript Algorithms and Data Structures Certification

I’ve tried using the console.log before the return statement, after the above statement and before + after the return statement. But still this section is not passing. Pls is this a bug, I need help

Your code so far

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


// User Editable Region

function padRow(name) {
  const test = "Testing";
  
  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 + row + "\n";
}

console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 60

Please put your code into a forum post.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

I’ve merged your posts. Please only open 1 topic per step.

You have missed off the 2nd instruction:

Copy the console log and paste it above the return statement. Now, the string "This works!" should appear in the console.

If you are still having a problem please reply to this thread and post your updated code.

Its now passing when I put the return statement within the logs. Although I’ve tried this several times but didnot work. But its now working. Thanks

1 Like