Clear a dictionary : Dictionary « 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.Dictionary");

      function testIt() {
        var dy = new dojox.collections.Dictionary();
        dy.add("A", "a");
        dy.add("B", "b");
        dy.add("Q", "q");
        dy.add("R", "r");
        
        dy.clear();
        alert(dy.count);
      }
    </script>
  </head>
  <body onLoad="testIt();">
  </body>
</html>








29.33.Dictionary
29.33.1.Create a dictionary
29.33.2.Clear a dictionary
29.33.3.Dictionary key iterator
29.33.4.Dictionary value iterator
29.33.5.Dictionary.Entry
29.33.6.Dictionary.containsKey
29.33.7.Dictionary.containsValue
29.33.8.Dictionary.count
29.33.9.Get Iterator from dictionary
29.33.10.Remove entry from Dictionary