Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function implementPop(arr){
- Array.prototype.ipop = function(){
- let popedEl = this[this.length-1];
- this.length = 5;
- return popedEl;
- }
- console.log(arr.ipop());
- console.log(arr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement