Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to shift and unshift using JavaScript?
How to shift and unshift using JavaScript?
✍: Guest
<script type="text/javascript">
var numbers = ["one", "two", "three", "four"];
numbers.unshift("zero");
document.write(" "+numbers.shift());
document.write(" "+numbers.shift());
document.write(" "+numbers.shift());
</script>
This produces
zero one two
shift, unshift, push, and pop may be used on the same array. Queues are easily implemented using combinations.
2011-08-02, 3846👍, 0💬
Popular Posts:
Can Sub Procedure/Function Be Called Recursively? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
What is Service Oriented architecture? “Services” are components which expose well defined interface...
Can you have virtual functions in Java? Yes, all functions in Java are virtual by default. This is a...
How To Enter Characters as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics If you want to ent...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...