DEV Community

phyosithu
phyosithu

Posted on • Edited on

What is the value of popp?

const array = ['John','Peter','Staeve'];
const popp = array.pop();
console.log(popp) ?????

Top comments (1)

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

It's to remove the the last item added to your array. Even if you do not know the value or location in memory of that last item.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay