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 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, 4075👍, 0💬
Popular Posts:
How to set a cookie with the contents of a textbox ? Values stored in cookies may not have semicolon...
How do we generate strong names ? or What is use the of SN.EXE ? or How do we apply strong names to ...
If we have two version of same assembly in GAC how do we make a choice ? OK first let’s try to under...
How to convert a Unix timestamp to a Win32 FILETIME or SYSTEMTIME? The following function converts a...
What is difference between ADPATCH and OPATCH ? # ADPATCH is utility to apply ORACLE application Pat...