klyn.collections.Map.operator[]
method
public operator[](key as K) as V
Description

Gets or sets the value associated with a key.

Parameters
ParameterDescription
keyThe key to access.
Returns

The value associated with key.

Throws
  • KeyException If a read targets an absent key.
Example
values as Map<String, Int> = {}
values["answer"] = 42
assert values["answer"] == 42