loading...

re: How To Use A Hash VIEW POST

FULL DISCUSSION
 

Well done, good intro!

As a nitpick, the shorthand section has a little mistake, as it should be:

myhash = {:thing1 => 45, :thing2 => 67, :symbol1 => 67}

that is equivalent to:

myhash = {thing1: 45, thing2: 67, symbol1: 67}

since the new hash syntax turns keys into symbols.

 
code of conduct - report abuse