Arrays have a pop() method (it works with push()) that reduces the length of an array by 1 but also returns the value of the deleted element.
Your email address will not be published. Required fields are marked *
Submit Your Solution hear: