LoginSignup
0
0

More than 1 year has passed since last update.

文字列と数値はそのままでは連結できない!?

Posted at

◼️ タイトルにもある通り、文字列と数値は連結できない。もし、文字列と数値を連結したいなら下記の書き方を覚える必要がある。

書き方:  puts "1日は" + (24 * 60 ).to_s + "分です。"

上記のように数字の値の辺りに( ).to_s という記号を加えるだけでOK!!:point_up:

今日の投稿は以上です。

wagaでした!

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0