#Ruby‐ハッシュについて‐
変数名={シンボル:値1,シンボル:値2}
puts 変数名[:シンボル]
qiita.rb
cat = {name: "siro", age: 23}
put cat[:name]
jsと似ているが出力の表記が違うので注意!
Go to list of users who liked
More than 3 years have passed since last update.
#Ruby‐ハッシュについて‐
変数名={シンボル:値1,シンボル:値2}
puts 変数名[:シンボル]
cat = {name: "siro", age: 23}
put cat[:name]
jsと似ているが出力の表記が違うので注意!
Register as a new user and use Qiita more conveniently
Go to list of users who liked