Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-08-2013, 09:09 PM   PM User | #1
Alona
New to the CF scene

 
Join Date: Dec 2012
Location: Moscow
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Alona is an unknown quantity at this point
Javascript Stacks

Javascript LIFO

Last edited by Alona; 01-09-2013 at 12:00 PM..
Alona is offline   Reply With Quote
Old 01-08-2013, 09:17 PM   PM User | #2
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 454 Times in 452 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
what have you done so far?
xelawho is offline   Reply With Quote
Old 01-09-2013, 01:00 AM   PM User | #3
sbhmf
New Coder

 
Join Date: Jan 2013
Location: Sunnyvale, CA
Posts: 40
Thanks: 3
Thanked 1 Time in 1 Post
sbhmf is an unknown quantity at this point
create two array objects, and use their push() and pop() functions to do precisely that!

e.g.:
pressing ENTER: array2.push( <text value> );
pressing FORWARD: array3.push( array2.pop() );
pressing BACK: array2.push( array3.pop() );

search for JavaScript Array object members for additional functions.
sbhmf is offline   Reply With Quote
Old 01-09-2013, 09:52 AM   PM User | #4
Alona
New to the CF scene

 
Join Date: Dec 2012
Location: Moscow
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Alona is an unknown quantity at this point
Thanks a lot.

Last edited by Alona; 01-09-2013 at 11:54 AM..
Alona is offline   Reply With Quote
Old 01-09-2013, 01:00 PM   PM User | #5
Alona
New to the CF scene

 
Join Date: Dec 2012
Location: Moscow
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Alona is an unknown quantity at this point
Thanks.

Last edited by Alona; 01-10-2013 at 10:23 AM..
Alona is offline   Reply With Quote
Old 01-10-2013, 06:37 AM   PM User | #6
sbhmf
New Coder

 
Join Date: Jan 2013
Location: Sunnyvale, CA
Posts: 40
Thanks: 3
Thanked 1 Time in 1 Post
sbhmf is an unknown quantity at this point
the least you can do is rewrite it with different variable names, you might even learn something through the experience...
sbhmf is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:57 PM.


Advertisement
Log in to turn off these ads.