Learn Introductory JavaScript by Building a Pyramid Generator - Step 59

Tell us what’s happening:

my testing variable cannot be seen on the console.

Your code so far sir/madam

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


// User Editable Region

function padRow(test) {
  const test = "Testing";  
  return character + name;
}


// User Editable Region

const call = padRow("Test");
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/133.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 59

you need to use console.log to see “Testing” in the console

but the issue is this:

To use your "Testing" value, return it out of the padRow function by updating your return statement to return only the test variable.

What is your return statement now?

1 Like

how do you update sir/madam ILM

in javascript please sir/madam

update means “change to a new value”
do you understand what the new value needs to be?

no sir/madam please help

@mbuyaandrew254
**This is NOT a reprimand it just pointing out how to respectly communicate with and address others.

please stop including ‘sir/madam’ in your responses and write directly

instead use
no, please help
or no Mx. please help if you don’t know the gender of someone.

or no they please help
You have so many options. If I’m wrong about this feel free to let me know why.

that’s not grammatically correct… it’s like me talking to you and sayhing “hey he please help”

1 Like

the isntructions are asking

do you know how to return a variable?