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 );/* w ww .  jav a2s . c o m*/
fruits.pop();
console.log( fruits );

Result