Javascript - Write program to Use the pop() method to remove the last item from an array.

Requirements

Use the pop() method to remove the last item from the fruits array.

Here is the array

var fruits = ["Banana", "Orange", "Apple"];

Demo

var fruits = ["Banana", "Orange", "Apple"];
console.log( fruits );/*  www. j a  va  2 s .  com*/
fruits.pop();
console.log( fruits );

Result