getOrDefault method
V
getOrDefault(
- K key,
- V defaultValue
Returns the value corresponding to the given key
, or defaultValue
if
such a key
is not present in the Map.
Implementation
V getOrDefault(K key, V defaultValue) => this[key] ?? defaultValue;