Push function
The push stack function is as follows:.
push (Variable item)
Adds the item to the end of the array. This is equivalent to the array function Array-add-function but adds in readability when using the array as a last-in first-out (LIFO) stack.
Parameters:
item - Item to be pushed onto stack,
Returns:
This function does not return a value.
Example:
stack.push("one")
stack.push("two")
stack.push("three")
three = stack.pop()
two = stack.pop()
one = stack.pop()
// stack is now empty. one is "one", two is "two" and three is "three"
stack.push("two")
stack.push("three")
three = stack.pop()
two = stack.pop()
one = stack.pop()
// stack is now empty. one is "one", two is "two" and three is "three"
Related topic
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*