Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to removes the last element from an array in javascript ?

user-image
Question added by mohamed ahmed mahmoud , مصمم مواقع انترنت web designer , conect
Date Posted: 2017/03/15
Anish Prasad
by Anish Prasad , SDE-3 , Indiavidual Learning pvt ltd

var array = [1, 0, 2]; var newarray = array.slice(0, -1); console.log(newarray); // returns [1,0]

More Questions Like This