Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list = {'yvr' => 'Vancouver', 'yba' => 'Banff', 'yyz' => 'Toronto', 'yxx' => 'Abbotsford', 'ybw' => 'Calgary'}
- # Why is it returning nil instead of first element of the list above?
- # A: It is not calling a proper key as 'list' is a hash, not an array
- p list['yvr']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement