DEV Community

Discussion on: How To Use A Hash

Collapse
 
raphink profile image
Raphaël Pinson

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.

Collapse
 
seanolad profile image
Sean

okay