RosettaCodeData/Task/Associative-array-Creation/PowerShell/associative-array-creation-3.psh

5 lines
210 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
$hashtable.foo = "bar"
$hashtable['bar'] = 42
$hashtable."a b" = 3.14 # keys can contain spaces, property-style access needs quotation marks, then
$hashtable[5] = 8 # keys don't need to be strings