Tell us what’s happening:
Step 27
Another method essential for this project is the .pop() method. It removes the last element from an array and returns that element.
When a method returns a value, you can think of it as giving the value back to you, making it available for use in other parts of your code.
Create a new variable called popped and assign it the result of rows.pop(). Then, log popped to the console.
i don’t understand this Question?
Your code so far
let character = 'Hello';
let count = 8;
// User Editable Region
let rows = ["Naomi", "Quincy", "CamperChan"];
rows.push("freeCodeCamp");
rows.pop("freeCodeCamp");
console.log(rows);
rows.push("popped");
console.log(rows);
rows.pop("popped");
console.log(rows);
let popped = ["Naomi"]
popped.push("FreeCodeCamp");
popped.pop("FreeCodeCamp");
console.log(popped);
popped.pop;
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/130.0.0.0 Safari/537.36 Edg/130.0.0.0
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 27