/* Example Usage */constmodel=...Someone Model(async () => {awaitmodel.findOneAndUpdate({ name:"Test", age:20, arr: ["test","test123"] },{ $pop:{ arr:-1 } });/*The "arr" value that was ["test","test123"] is now ["test123"]*/awaitmodel.findOneAndUpdate({ name:"Test", age:20, arr: ["test","test123"] },{ $pop:{ arr:1 } });/*The "arr" value that was ["test","test123"] is now ["test"]*/})();
$pop
Object
$pop Operator Uses to Remove Last or First Values ββin Array Types