Home / Javascript Tips Generated By ChatGPT / Removing the Last Element from Arrays with pop in Javascript Remove the last item from an array. Source Code let fruits = ["Apple", "Banana", "Orange"]; let lastFruit = fruits.pop(); console.log(fruits); // ["Apple", "Banana"] console.log(lastFruit); // "Orange"