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

5 lines
210 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07: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