Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Stack/Jsish/stack.jsish
Normal file
15
Task/Stack/Jsish/stack.jsish
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* Stack, is Jsish */
|
||||
var stack = [];
|
||||
puts('depth:', stack.length);
|
||||
|
||||
stack.push(42);
|
||||
stack.push('abc');
|
||||
puts('depth:', stack.length);
|
||||
|
||||
puts('popped:', stack.pop());
|
||||
if (stack.length) printf('not '); printf('empty\n');
|
||||
puts('top:', stack[stack.length-1]);
|
||||
puts('popped:', stack.pop());
|
||||
if (stack.length) printf('not '); printf('empty\n');
|
||||
|
||||
puts('depth:', stack.length);
|
||||
Loading…
Add table
Add a link
Reference in a new issue