Push elements to stack : Stack « Dojo toolkit « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojox.collections.Stack");

      function testIt() {
        var st = new dojox.collections.Stack();
        st.push("A");
        st.push("B");
        st.push("C");
        st.push("D");
        alert( st.toArray());


      }
    </script>

  </head>

  <body onLoad="testIt();">
  </body>
</html>








29.34.Stack
29.34.1.Get iterator from Stack
29.34.2.Push elements to stack
29.34.3.Peek element
29.34.4.Pop element out
29.34.5.Stack.contains
29.34.6.Convert stack to array