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"



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