Dictionary.Item()

JScript3.0+Syntax

							dictionaryobj.Item(key)
							dictionaryobj.Item(key) = newItem
						

Description

The Item() property of the Dictionary object provides the capability to retrieve, create, and modify items in the dictionary.

To retrieve an item from the dictionary, simply specify the key of the item to be returned in the argument list. The item associated with the key will be returned. If the key does not exist in the dictionary, a new key, item pair will be created in the dictionary and the item will be left empty. Nothing is returned from the method when this scenario occurs.

To create a new key, item pair in the dictionary specify a new unique key as the method's argument. Directly after the Item() method, place an equal sign followed ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.