faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

13 of 20 people (65%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

push and pop

Apr 7th, 2008 22:41
ha mo, Jean-Bernard Valentaten, Colin Fraser, Matt Weston,


Colin wrote:
I assume that you have some cryptic meaning here, because both push and
pop are used in Assembler or Assembly, whichever you prefer. In either
case, they have no role in Javascript.. sorry.
----
Not quite true. js Arrays have the methods push and pop.
- pop() deletes the last element in the array
- push() appends one (or more) elements to the array, which has (have) 
         to be given as argument(s). In js 1.2 it returns the newest 
         element in the array, in  higher versions it returns the length
HTH,
Jean
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com