Cant seem to figure out my error. Tried looking up “call” in JS but am still a bit confused on how to call my .pop method
Your code so far
let character = 'Hello';
let count = 8;
// User Editable Region
let rows = ["Naomi", "Quincy", "CamperChan"];
rows.push("freeCodeCamp");
console.log(rows);
let popped;
rows.pop(popped);
console.log(popped);
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 26
I have no clue what i’m doing wrong.
what i got so far
let rows = [“Naomi”, “Quincy”, “CamperChan”];
rows.push(“freeCodeCamp”);
console.log(rows);
let popped;
rows.pop(popped);
console.log(popped);
what console gives me
// running tests
You should call the .pop() method.
You should call the .pop() method on your rows array.
// tests completed
// console output
[ ‘Naomi’, ‘Quincy’, ‘CamperChan’, ‘freeCodeCamp’ ]
undefined
Your code so far
let character = 'Hello';
let count = 8;
// User Editable Region
let rows = ["Naomi", "Quincy", "CamperChan"];
rows.push("freeCodeCamp");
console.log(rows);
let popped;
rows.pop(popped);
console.log(popped);
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 26
In the future, please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.
The easiest way to create a topic for help with your own solution is to click the Ask for Help button located on each challenge. This will automatically import your code in a readable format and pull in the challenge url while still allowing you to ask any question about the challenge or your code.
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.