Use Array as a stack : Stack : Array JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Array » Stack »

 

Use Array as a stack

















<html>
<head>
<title>Example</title>
</head>
<body>
<script type="text/javascript">
var stack = new Array;
stack.push("A");
stack.push("B");
stack.push("C");
document.write("stack:"+stack.toString());

document.write("<br>");

var vItem = stack.pop();
document.write("vItem:"+vItem);
document.write("<br>");
document.write("stack:"+stack.toString());

</script>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Array
» Stack