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.