Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to make a array as a stack using JavaScript?
How to make a array as a stack using JavaScript?
✍: Guest
The pop() and push() functions turn a harmless array into a stack:
<script type="text/javascript">
var numbers = ["one", "two", "three", "four"];
numbers.push("five");
numbers.push("six");
document.write(numbers.pop());
document.write(numbers.pop());
document.write(numbers.pop());
</script>
This produces:
sixfivefour
2011-07-26, 4125👍, 0💬
Popular Posts:
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...
Is There Any XSD File to Validate Atom Feed Files? - RSS FAQs - Atom Feed Introduction and File Gene...
What is Windows DNA architecture? Note :- If you have worked with classic ASP this question can come...
What are the different accessibility levels defined in .NET ? Following are the five levels of acces...
How Do I Run JUnit Tests from Command Window? To run JUnit tests from a command window, you need to ...