pop - push


pop

Removes the element from the back

alert( people.pop() );    // "david" 
alert( people ); // "steve", "john"

push

Adds an element to the back

people.push("david"); 
alert( people ); // "steve", "john", "david"



© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext