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:
Related in same category :
-
|