Show that containsKey is false when there is no matching keyĪssert( ntainsKey('notReal') = false, "containsKey('notReal') should return false no such object is in the lookup table.") Test a property of the fetched object just to show there is support for more than just string typesĪssert( ref.prop1 = 'Hello', "ref.prop1 should equal 'hello' ") Test that ref was fetched from the dictionaryĪssert( ref != undefined, "ref should not be undefined it should be a reference to testObj") MyMap.put('myKey2', Īssert( myMap.size() = 2, "size should be 2 after adding 2 entries.") See: JavaScript Map usage exampleĪs you can see from the example below, using this map is just like using a map in Java. Before using this map, please be advised that maps are now available as a part of the ECMAScript 2015 (ES6) standard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |